Author: marek Date: 2010-05-21 11:59:26 +0200 (Fri, 21 May 2010) New Revision: 1671
Modified: trunk/batman-adv-kernelland/icmp_socket.c Log: 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
Modified: trunk/batman-adv-kernelland/icmp_socket.c =================================================================== --- trunk/batman-adv-kernelland/icmp_socket.c 2010-05-21 09:59:26 UTC (rev 1670) +++ trunk/batman-adv-kernelland/icmp_socket.c 2010-05-21 09:59:26 UTC (rev 1671) @@ -292,7 +292,7 @@ struct socket_packet *socket_packet; unsigned long flags;
- socket_packet = kmalloc(sizeof(struct socket_packet), GFP_KERNEL); + socket_packet = kmalloc(sizeof(struct socket_packet), GFP_ATOMIC);
if (!socket_packet) return;