diff options
author | Kulikov Vasiliy | 2010-07-27 20:42:40 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2010-08-09 04:43:06 +0200 |
commit | d0a38ce27e1b11116f02835b076fcb79db987e2c (patch) | |
tree | d1b638662451edc34b83ac31b4d31acf65b2be1b /drivers/media/dvb | |
parent | V4L/DVB: media: video: pvrusb2: remove custom hex_to_bin() (diff) | |
download | kernel-qcow2-linux-d0a38ce27e1b11116f02835b076fcb79db987e2c.tar.gz kernel-qcow2-linux-d0a38ce27e1b11116f02835b076fcb79db987e2c.tar.xz kernel-qcow2-linux-d0a38ce27e1b11116f02835b076fcb79db987e2c.zip |
V4L/DVB: dvb: siano: free spinlock before schedule()
Calling schedule() holding spinlock with disables irqs is improper. As
spinlock protects list coredev->buffers, it can be unlocked untill wakeup.
This bug was introduced in a9349315f65cd6a16e8fab1f6cf0fd40f379c4db.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 7f2c94a15ab1..d93468cd3a85 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -1113,9 +1113,11 @@ struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) */ prepare_to_wait(&coredev->buffer_mng_waitq, &wait, TASK_INTERRUPTIBLE); - - if (list_empty(&coredev->buffers)) + if (list_empty(&coredev->buffers)) { + spin_unlock_irqrestore(&coredev->bufferslock, flags); schedule(); + spin_lock_irqsave(&coredev->bufferslock, flags); + } finish_wait(&coredev->buffer_mng_waitq, &wait); |