> > +   if ( vdev->users ) {
> > +           sleep_on( &vicam_v4l_priv->no_users );
> > +   }
> >
> > _Very_ bad idea.
> > First, never use sleep_on. Use the appropriate macro.
>
> What's wrong with sleep_on? What is the appropriate macro?

sleep_on has a race condition by design, you may loose the wake up
and there's nothing you can do about it. There's a risk of becoming
a sleeping beauty.
Use wait_event instead.

> > Second, you have blocked khubd without an upper time limit.
> > That you _must_ _not_ in any case do.
>
> I see the argument, but it's not unbounded. Since we've set all of the
> flags to keep anyone from talking to the device, they'll all exit with
> an error as soon as they run again. The PWC code looks like it does

Provided they make a syscall at all. Opening a device node and not use it
for ages is a valid behaviour.

> essentially the same thing here (which is why I did it).

I'll have a look at pwc. On the other stuff more tomorrow. I am too tired.

        Regards
                Oliver



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to