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:47 PM
Herton Ronaldo Krzesinski
 
Default Avoid sysfs oops when an rc_dev's raw device is absent

On Mon, Aug 06, 2012 at 02:06:48PM -0300, Herton Ronaldo Krzesinski wrote:
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 6e16b09..cabc19c 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -775,10 +775,11 @@ static ssize_t show_protocols(struct device *device,
> if (dev->driver_type == RC_DRIVER_SCANCODE) {
> enabled = dev->rc_map.rc_type;
> allowed = dev->allowed_protos;
> - } else {
> + } else if (dev->raw) {
> enabled = dev->raw->enabled_protocols;
> allowed = ir_raw_get_allowed_protocols();
> - }
> + } else
> + return -ENODEV;

This patch has an issue, thanks to Ben Hutchings that pointed it out.
It's missing an mutex_unlock on exit. I'll post shortly an patch to
address, or we can revert and later reapply with the fix that should get
into upstream.

>
> IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx
",
> (long long)allowed,
> --
> 1.7.9.5
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>

--
[]'s
Herton

--
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 10:53 AM.

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