commit | 821ed3662913faca0653c201fa9e36fbab81f17c | [log] [tgz] |
---|---|---|
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | Tue Dec 15 08:36:51 2015 -0200 |
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | Mon Jan 11 12:19:15 2016 -0200 |
tree | c43c57c89f2be2b72dee12183172af907436a999 | |
parent | b2ed8af910a436e12038f8ec8ca6c039f43767a4 [diff] |
[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>