aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-15 08:36:51 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:19:15 -0200
commit821ed3662913faca0653c201fa9e36fbab81f17c (patch)
treec43c57c89f2be2b72dee12183172af907436a999 /include/media
parent[media] media-device: move media entity register/unregister functions (diff)
downloadlinux-dev-821ed3662913faca0653c201fa9e36fbab81f17c.tar.xz
linux-dev-821ed3662913faca0653c201fa9e36fbab81f17c.zip
[media] media-device: better lock media_device_unregister()
If media_device_unregister() is called by two different drivers, a race condition may happen, as the check if the device is not registered is not protected. Move the spin_lock() to happen earlier in the function, in order to prevent such race condition. Reported-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
0 files changed, 0 insertions, 0 deletions