media: rc: fix race condition in ir_raw_event_store_edge() handling
authorSean Young <sean@mess.org>
Wed, 14 Feb 2018 15:26:17 +0000 (10:26 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 27 Feb 2018 13:16:09 +0000 (08:16 -0500)
commite3e389f931a14ddf43089c7db92fc5d74edf93a4
treef86b1de14994ef7aab7962abc89babb75580d184
parent5817b3d15e67f8a7280e06e0dfb2c7ede5897cd3
media: rc: fix race condition in ir_raw_event_store_edge() handling

There is a possible race condition between the IR timeout being generated
from the timer, and new IR arriving. This could result in the timeout
being added to the kfifo after new IR arrives. On top of that, there is
concurrent write access to the kfifo from ir_raw_event_store_edge() and
the timer.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/rc-core-priv.h
drivers/media/rc/rc-ir-raw.c