summaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-11-18 14:30:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 20:25:34 +0100
commitda191c28f571cae4b470b079394bd4a87e459035 (patch)
tree4eaa9f1d4b5a015a8ebf5861d55405a248df47b9 /drivers/char/snsc.c
parentdd5c472a60e43549d789a17a8444513eec64bd7e (diff)
downloadlinux-stable-da191c28f571cae4b470b079394bd4a87e459035.tar.gz
linux-stable-da191c28f571cae4b470b079394bd4a87e459035.tar.bz2
linux-stable-da191c28f571cae4b470b079394bd4a87e459035.zip
snsc: restore IRQs on error path in scdrv_write()
This bug is as old as git. We need to be calling spin_unlock_irqrestore() instead of regular spin_unlock() here. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/snsc.c')
-rw-r--r--drivers/char/snsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 10e56323f390..ec07f0e99732 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -285,7 +285,7 @@ scdrv_write(struct file *file, const char __user *buf,
DECLARE_WAITQUEUE(wait, current);
if (file->f_flags & O_NONBLOCK) {
- spin_unlock(&sd->sd_wlock);
+ spin_unlock_irqrestore(&sd->sd_wlock, flags);
up(&sd->sd_wbs);
return -EAGAIN;
}