]> git.baikalelectronics.ru Git - kernel.git/commit
[media] rc: Set rdev before irq setup
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 2 Nov 2012 12:13:55 +0000 (09:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 21 Dec 2012 20:26:10 +0000 (18:26 -0200)
commit37135b85c68b6eba49d596f8bbcc8995a215589c
treeeabe4461b28170fddc8f40e1919d9c6505dcb942
parent07fcdbb6ff81d501f736be88d85dd7ae6db4f344
[media] rc: Set rdev before irq setup

This fixes a problem in fintek-cir and nuvoton-cir where the
irq handler would trigger during module load before the rdev member was
set, causing a NULL pointer crash.
It seems this crash is very reproducible (just bombard the receiver with
IR signals during module load), probably because when request_irq is
called, any pending intterupt is handled immediately, before
request_irq returns and rdev can be set.
This same crash was supposed to be fixed by commit
210da6028446a5414210c615cf9cc78dd4c5339f ("[media] rc: Postpone ISR
registration"), but the crash was still observed on the nuvoton-cir
driver.
This commit was tested on nuvoton-cir only.

Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/fintek-cir.c
drivers/media/rc/nuvoton-cir.c