diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2018-05-23 16:13:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-28 16:05:03 -0400 |
commit | 6992effe5344ceba1c53fd1a062df57e820b27cd (patch) | |
tree | 8c1fe015adc7dd0a813ffe2eb9c2a344ceabb9e1 /drivers/fmc | |
parent | df95e82f6b0db20615cf249aec653bcd79ea2b59 (diff) | |
download | linux-6992effe5344ceba1c53fd1a062df57e820b27cd.tar.bz2 |
media: gspca: Kill all URBs before releasing any of them
Some subdrivers access the gspca_dev->urb array in the completion handler.
To prevent use-after-free (actually, NULL dereferences) we need to
synchronously kill all the URBs before we release them.
In particular, this is currently the case for drivers such
as sn9c20x and sonixj, which access the gspca_dev->urb[0]
in the context of completion handler for *any* of the URBs.
This commit changes the destroy_urb implementation, so it kills
all URBs first, and then proceed to set the URBs to NULL in the
array and release them.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/fmc')
0 files changed, 0 insertions, 0 deletions