staging: hv: fix netvsc sleeping while atomic

commit d70c673153d42e8aefd5ac296c8159ef222d076b upstream.

The channel callbacks are called directly from vmbus_event_dpc
which runs in tasklet context. These callbacks need to use
GFP_ATOMIC.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16701

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Timo Teräs 2010-12-17 11:40:24 +02:00 committed by Greg Kroah-Hartman
parent 1f17ecf71f
commit 20b725b8b1

View File

@ -1236,7 +1236,7 @@ static void NetVscOnChannelCallback(void *Context)
/* ASSERT(device); */
packet = kzalloc(NETVSC_PACKET_SIZE * sizeof(unsigned char),
GFP_KERNEL);
GFP_ATOMIC);
if (!packet)
return;
buffer = packet;