Thread (13 messages) 13 messages, 5 authors, 2010-09-15
STALE5748d

[PATCH] ir-core: Fix null dereferences in the protocols sysfs interface

From: Brian Rogers <hidden>
Date: 2010-09-15 13:03:01
Also in: linux-media

  On 09/08/2010 07:16 AM, Jarod Wilson wrote:
On Wed, Sep 08, 2010 at 07:04:03AM -0700, Brian Rogers wrote:
quoted
ir_dev->raw is also null. If I check these pointers before using
them, and bail out if both are null, then I get a working lircd, but
of course the file /sys/devices/virtual/rc/rc0/protocols no longer
does anything. On 2.6.35.4, the system never creates the
/sys/class/rc/rc0/current_protocol file. Is it the case that the
'protocols' file should never appear, because my card can't support
this feature?
Hm... So protocols is indeed intended for hardware that handles raw IR, as
its a list of raw IR decoders available/enabled/disabled for the receiver.
But some devices that do onboard decoding and deal with scancodes still
need to support changing protocols, as they can be told "decode rc5" or
"decode nec", etc... My memory is currently foggy on how it was exactly
that it was supposed to be donee though. :) (Yet another reason I really
need to poke at the imon driver code again).
How about the attached patch? Does this look like a reasonable solution 
for 2.6.36?

Brian

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help