linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] snsc: restore IRQs on error path in scdrv_write()
@ 2016-11-18 11:30 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-11-18 11:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Greg Kroah-Hartman, linux-kernel, kernel-janitors

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>

diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 10e5632..ec07f0e 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;
 		}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-18 11:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-18 11:30 [patch] snsc: restore IRQs on error path in scdrv_write() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).