From 239d1346f5f77135e272eee0c33cfa3e52fc4e1c Mon Sep 17 00:00:00 2001 From: Konrad Zapalowicz Date: Sun, 31 Aug 2014 22:42:15 +0200 Subject: [PATCH] staging: dgnc: Fix sleeping under spinlock bug This commit changes the memory allocation flags to ATOMIC in order to avoid sleeping in the nowait/nolock code. Signed-off-by: Konrad Zapalowicz Signed-off-by: Greg Kroah-Hartman --- 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 afb20a3e13ab..a798476cf4ea 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; -- 2.30.2