Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipwireless: don't oops if we run out of space

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49851

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
d1519e23 4bd82136

+4 -1
+4 -1
drivers/tty/ipwireless/network.c
··· 352 352 } 353 353 354 354 skb = dev_alloc_skb(length + 4); 355 + if (skb == NULL) 356 + return NULL; 355 357 skb_reserve(skb, 2); 356 358 memcpy(skb_put(skb, length), data, length); 357 359 ··· 399 397 400 398 /* Send the data to the ppp_generic module. */ 401 399 skb = ipw_packet_received_skb(data, length); 402 - ppp_input(network->ppp_channel, skb); 400 + if (skb) 401 + ppp_input(network->ppp_channel, skb); 403 402 } else 404 403 spin_unlock_irqrestore(&network->lock, 405 404 flags);