linux/drivers/media/rc
James Hogan df1caa587a [media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo
Raw IR events are passed to the raw event thread through a kfifo. The
size of the event struct is 12 bytes, and space for 512 events is
reserved in the kfifo (6144 bytes), however this is rounded down to 4096
bytes (the next power of 2) by __kfifo_alloc().

4096 bytes is not divisible by 12 therefore if the fifo fills up a third
of a record will be written in the end of the kfifo by
ir_raw_event_store() because the recsize of the fifo is 0 (it doesn't
have records). When this is read by ir_raw_event_thread() a corrupted or
partial record will be read, and in the case of a partial record the
BUG_ON(retval != sizeof(ev)) gets hit too.

According to samples/kfifo/record-example.c struct kfifo_rec_ptr_1 can
handle records of a length between 0 and 255 bytes, so change struct
ir_raw_event_ctrl to use that instead of struct kfifo.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:39:53 -03:00
..
keymaps [media] IT913X Version 1 and Version 2 keymaps 2012-02-14 14:07:46 -02:00
ati_remote.c Merge branch 'driver-core-next' into Linux 3.2 2012-01-06 11:42:52 -08:00
ene_ir.c treewide: Fix comment and string typo 'bufer' 2011-12-06 09:53:40 +01:00
ene_ir.h treewide: Fix comment and string typo 'bufer' 2011-12-06 09:53:40 +01:00
fintek-cir.c [media] fintek-cir: add support for newer chip version 2012-02-14 16:53:53 -02:00
fintek-cir.h [media] fintek-cir: add support for newer chip version 2012-02-14 16:53:53 -02:00
imon.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
ir-jvc-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-lirc-codec.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ir-mce_kbd-decoder.c [media] ir-mce_kbd-decoder: include module.h for its facilities 2011-07-29 12:54:38 -03:00
ir-nec-decoder.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
ir-raw.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
ir-rc5-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-rc5-sz-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-rc6-decoder.c [media] ir-rc6-decoder: Support RC6-6A variable length data 2011-11-23 22:23:15 -02:00
ir-sanyo-decoder.c [media] ir-sanyo-decoder.c doesn't compile 2011-11-24 12:13:09 -02:00
ir-sony-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ite-cir.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-07-30 00:08:53 -07:00
ite-cir.h [media] ite-cir: 8709 needs to use pnp resource 2 2011-07-01 16:31:38 -03:00
Kconfig [media] rc: Add support for decoding Sanyo protocol 2011-11-23 19:23:10 -02:00
lirc_dev.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
Makefile [media] rc: Add support for decoding Sanyo protocol 2011-11-23 19:23:10 -02:00
mceusb.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
nuvoton-cir.c [media] nuvoton-cir: simplify raw IR sample handling 2011-09-11 09:33:40 -03:00
nuvoton-cir.h [media] nuvoton-cir: simplify raw IR sample handling 2011-09-11 09:33:40 -03:00
rc-core-priv.h [media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo 2012-03-08 10:39:53 -03:00
rc-loopback.c [media] rc-core: lirc use unsigned int 2011-07-27 17:52:59 -03:00
rc-main.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
redrat3.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
streamzap.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
winbond-cir.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30