From: Konrad Zapalowicz Date: Sun, 31 Aug 2014 20:42:15 +0000 (+0200) Subject: staging: dgnc: Fix sleeping under spinlock bug X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=239d1346f5f77135e272eee0c33cfa3e52fc4e1c;p=linux-beck.git 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 --- 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;