aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 10:53:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-06 07:42:33 -0500
commita96fbe0429ace98bf3d92340ab9caa03c80db88c (patch)
tree3af76c7fc2f066646b17dfcc183345d6dd04d91a /drivers
parent1c612e9a1cf712bd7845e3adb4961e3ef8eaf8aa (diff)
[media] dib0700: do not lock interruptible on tear-down paths
When mutex_lock_interruptible is used on paths where a signal can be pending, the device is not closed properly and cannot be reused. This usually happens when you start tzap for example and send it a TERM signal. The signal is pending while tear-down routines are called. Hence streaming is not properly stopped in that case. And the device stops working from that moment on. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c
index 19b5ed2825d7..bf2a908d74cf 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -561,10 +561,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
561 } 561 }
562 } 562 }
563 563
564 if (mutex_lock_interruptible(&adap->dev->usb_mutex) < 0) { 564 mutex_lock(&adap->dev->usb_mutex);
565 err("could not acquire lock");
566 return -EINTR;
567 }
568 565
569 st->buf[0] = REQUEST_ENABLE_VIDEO; 566 st->buf[0] = REQUEST_ENABLE_VIDEO;
570 /* this bit gives a kind of command, 567 /* this bit gives a kind of command,