mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[media] V4L: soc-camera: protect hosts during probing from overzealous user-space
If multiple clients are registered on a single camera host interface, the user-space hot-plug software can try to access the one, that probed first, before probing of the second one has completed. This can be handled by individual host drivers, but it is even better to hold back the user-space until all the probing on this host has completed. This fixes a race on ecovec with two clients registered on the CEU1 host, which otherwise triggers a BUG() in sh_mobile_ceu_remove_device(). Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
e631f57804
commit
2f9a0c880d
2 changed files with 8 additions and 3 deletions
|
|
@ -59,7 +59,8 @@ struct soc_camera_device {
|
|||
struct soc_camera_host {
|
||||
struct v4l2_device v4l2_dev;
|
||||
struct list_head list;
|
||||
unsigned char nr; /* Host number */
|
||||
struct mutex host_lock; /* Protect during probing */
|
||||
unsigned char nr; /* Host number */
|
||||
void *priv;
|
||||
const char *drv_name;
|
||||
struct soc_camera_host_ops *ops;
|
||||
|
|
|
|||
Loading…
Reference in a new issue