[PATCH 1/1] EM28xx - fix deadlock when unplugging and replugging a DVB adapter

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

 



Here's the new patch for the deadlock problem, which releases the device mutex before calling em28xx_init_extension() and then reacquires it afterwards. The locking in dvb_init() is now left alone.

Signed-off-by: Chris Rankin <rankincj@xxxxxxxxx>

--- linux-3.0/drivers/media/video/em28xx/em28xx-cards.c.orig	2011-08-19 00:45:48.000000000 +0100
+++ linux-3.0/drivers/media/video/em28xx/em28xx-cards.c	2011-08-20 23:28:39.000000000 +0100
@@ -2929,7 +2929,9 @@
 		goto fail_reg_analog_devices;
 	}
 
+	mutex_unlock(&dev->lock);
 	em28xx_init_extension(dev);
+	mutex_lock(&dev->lock);
 
 	/* Save some power by putting tuner to sleep */
 	v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_power, 0);

[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