diff options
| author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-05-22 11:48:47 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-04 16:38:56 -0400 |
| commit | 0375fc4d2748b7c7064d481b36e32ef19e43d8db (patch) | |
| tree | 3da3845138386c843dd51d8b7b89867a624beea8 | |
| parent | 3d9b2358930a3e5225b28ac1458236f3d667e368 (diff) | |
Staging: batman-adv: Don't allocate icmp packet with GFP_KERNEL
A new buffer for a packet is created when a icmp packet is received.
This happens in a context with disabled irq. Thus we are not allowed to
sleep or call function which might sleep. kmalloc must be called with
GFP_ATOMIC instead of GFP_KERNEL to ensure that it does not sleep.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/staging/batman-adv/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index ad82ec4a4856..7eb6559e0315 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c | |||
| @@ -309,7 +309,7 @@ void bat_device_add_packet(struct device_client *device_client, | |||
| 309 | struct device_packet *device_packet; | 309 | struct device_packet *device_packet; |
| 310 | unsigned long flags; | 310 | unsigned long flags; |
| 311 | 311 | ||
| 312 | device_packet = kmalloc(sizeof(struct device_packet), GFP_KERNEL); | 312 | device_packet = kmalloc(sizeof(struct device_packet), GFP_ATOMIC); |
| 313 | 313 | ||
| 314 | if (!device_packet) | 314 | if (!device_packet) |
| 315 | return; | 315 | return; |
