upstream: [media] s2255: Do not free fw_data until timer handler has actually stopped...
authorKirill Tkhai <tkhai@yandex.ru>
Thu, 17 Apr 2014 20:47:04 +0000 (17:47 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:26:58 +0000 (14:26 +0900)
commit559d8e82dd076febe12f13ca4a35bda05bdca0f3
tree750c3adf131c422cdc5d29f0390e9d72fc3d5e98
parent0fe06b764dac5d5c7b55d340d2d9a62976e42293
upstream: [media] s2255: Do not free fw_data until timer handler has actually stopped using it

Function del_timer() does not guarantee that timer was really deleted.
If the timer handler is beeing executed at the moment, the function
does nothing. So, we have a race between del_timer() and kfree(), and
it's possible to use already freed memory in the handler.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/s2255/s2255drv.c