Hi,

I've been "plugging away" at the locking issue in the em28xx / em28xx-dvb modules, and I think I've found the reason. Basically, we're trying to acquire the dev->lock mutex again in dvb_init() when we've already acquired it in em28xx_init_dev().

The exact sequence is:
        em28xx_init_dev()
        - em28xx_init_extension()
        -- ops->init(dev) function for each extension

where ops->init = dvb_init() for the em28xx-dvb extension. However, if you remove the em28xx-dvb module first then the em28xx_extension_devlist is empty
and you avoid calling dvb_init().

As to the fix, I'm thinking of moving the mutex_lock() / mutex_unlock() calls
from dvb_init() to em28xx_register_extension() instead. This way, we ensure that dvb_init() is still always called with the dvb->lock mutex held.

I'll submit a patch for review in the morning. (Or should I say, "later this morning"...)

Cheers,
Chris
--
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