FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 08-07-2012, 01:50 PM
Herton Ronaldo Krzesinski
 
Default UBUNTU: SAUCE: Unlock the rc_dev lock when the raw device is missing

From: Douglas Bagnall <douglas@paradise.net.nz>

BugLink: http://bugs.launchpad.net/bugs/1015836

As pointed out by Ben Hutchings, after commit 720bb6436, the lock was
being taken and not released when an rc_dev has a NULL raw device.

Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
drivers/media/rc/rc-main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Commit 720bb6436 missed an mutex_unlock on exit, thanks to Ben Hutchings
for pointing that out. Marked as "SAUCE" since it's not upstream yet,
but it should be included upstream.

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index cabc19c..dcd45d0 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -778,9 +778,10 @@ static ssize_t show_protocols(struct device *device,
} else if (dev->raw) {
enabled = dev->raw->enabled_protocols;
allowed = ir_raw_get_allowed_protocols();
- } else
+ } else {
+ mutex_unlock(&dev->lock);
return -ENODEV;
-
+ }
IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx
",
(long long)allowed,
(long long)enabled);
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 02:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org