staging: dgnc: Fix sleeping under spinlock bug
authorKonrad Zapalowicz <bergo.torino+kernel@gmail.com>
Sun, 31 Aug 2014 20:42:15 +0000 (22:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 17:44:33 +0000 (10:44 -0700)
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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_tty.c

index afb20a3e13ab36159c724f196475f2c403794ce6..a798476cf4ea26fcd01b0bd23c246a9afc55f424 100644 (file)
@@ -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;