On Tue, Dec 6, 2011 at 8:43 AM, Mauro Carvalho Chehab
<mche...@redhat.com> wrote:
> The driver who binds everything is the bridge driver. In your case, it is
> the au0828 driver.
>
> What you're experiencing seems to be some race issue inside it, and not at
> xc5000.
>
> On a quick look on it, I'm noticing that there's no lock at
> au0828_usb_probe().
>
> Also, it uses a separate lock for analog and for digital:
>
>        mutex_init(&dev->mutex);
>        mutex_init(&dev->dvb.lock);
>
> Probably, the right thing to do would be to use just one lock for both
> rising
> it at usb_probe, lowering it just before return 0. This will avoid any open
> operations while the device is not fully initialized. Btw, newer udev's open
> the analog part of the driver just after V4L register, in order to get the
> device capabilities. This is known to cause race conditions, if the locking
> schema is not working properly.

Just to be clear, we're now talking about a completely different race
condition that has nothing to do with the subject at hand, and this
discussion should probably be moved to a new thread.

That said, yes, there is definitely a race (if not two) in there to be
tracked down.  I know of a couple of users who upgraded to more recent
kernels and started experiencing breakage on module load where there
was none before.  This could obviously be dumb luck in that perhaps
the timing changed slightly, or it could be some change in the core
code which created a new race.  I haven't had the time/energy to dig
into the issue (compounded by the fact that these sorts of issues are
notoriously difficult to debug when it cannot be reproduced locally by
the developer).

The notion that this is something that has been there for over a year
is something I only learned of in the last couple of days.  All the
complaints I had seen thus far were from existing users who were
perfectly happy until they upgraded their kernel a couple of months
ago and then started seeing the problem.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to