Possible cause of replug lockup in em28xx-dvb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux