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>
Tue, 18 Nov 2014 02:59:15 +0000 (11:59 +0900)
commitea0eb06a9ffb5ba65c2d2a3a72772446515010e5
tree9481e65222abbbbf90af39022bfda68b46f1618d
parentc959e4a611621bb75314b020c213d54ab5cc74dd
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