projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
952f8ee
)
[media] media-devnode: add missing mutex lock in error handler
author
Max Kellermann
<max@duempel.org>
Mon, 21 Mar 2016 11:33:12 +0000
(
04:33
-0700)
committer
Mauro Carvalho Chehab
<mchehab@osg.samsung.com>
Wed, 6 Apr 2016 12:39:56 +0000
(
05:39
-0700)
We should protect the device unregister patch too, at the error
condition.
Signed-off-by: Max Kellermann <max@duempel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/media-devnode.c
patch
|
blob
|
history
diff --git
a/drivers/media/media-devnode.c
b/drivers/media/media-devnode.c
index
29409f4
..
64a4b1e
100644
(file)
--- a/
drivers/media/media-devnode.c
+++ b/
drivers/media/media-devnode.c
@@
-267,8
+267,11
@@
int __must_check media_devnode_register(struct media_devnode *mdev,
return 0;
error:
+ mutex_lock(&media_devnode_lock);
cdev_del(&mdev->cdev);
clear_bit(mdev->minor, media_devnode_nums);
+ mutex_unlock(&media_devnode_lock);
+
return ret;
}