]> git.baikalelectronics.ru Git - kernel.git/commit
[media] s2255: Do not free fw_data until timer handler has actually stopped using it
authorKirill Tkhai <tkhai@yandex.ru>
Thu, 17 Apr 2014 20:47:04 +0000 (17:47 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 23 May 2014 15:16:39 +0000 (12:16 -0300)
commit03d5b10f06b60cebe7b0aa6544446b2290af10cb
tree8174f22b98e60fb5d0de5a2c4b1b623902e18f77
parent4b6e6a9bf7f447927396d0250b02b22c3db4c283
[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