I noticed the following code in cpia.c:

static int cpia_open(struct video_device *dev, int flags)
{
    int i;
    struct cam_data *cam = dev->priv;

    if (!cam) {
        DBG("Internal error, cam_data not found!\n");
        return -EBUSY;
    }

    if (cam->open_count > 0) {
        DBG("Camera already open\n");
        return -EBUSY;
    }

Is it possible (although extremely unlikely) that two processes could try 
and open a device at the same time and both of them believe that 
cam->open_count == 0 ?  If so, given the unlikely nature of this 
possibility, should it be a concern?

-Joe



_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to