[PATCH] staging: dgnc: Fix sleeping under spinlock bug

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

 



From: Konrad Zapalowicz <bergo.torino+kernel@xxxxxxxxx>

This commit changes the memory allocation flags to ATOMIC in order to
avoid sleeping in the nowait/nolock code.

Signed-off-by: Konrad Zapalowicz <bergo.torino+kernel@xxxxxxxxx>
---
 drivers/staging/dgnc/dgnc_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index afb20a3..a798476 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -462,7 +462,7 @@ void dgnc_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *buf, int
 	char *p;
 	int too_much_data;
 
-	tmpbuf = kzalloc(TMPBUFLEN, GFP_KERNEL);
+	tmpbuf = kzalloc(TMPBUFLEN, GFP_ATOMIC);
 	if (!tmpbuf)
 		return;
 	p = tmpbuf;
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux