diff options
author | Alan Cox <alan@linux.intel.com> | 2012-11-01 17:45:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-16 01:53:15 +0100 |
commit | d1519e23c2b3a518fb41daf3eceae43382433ceb (patch) | |
tree | 7ac7d32367f964801d4b63296025867fd775b987 /drivers/tty/ipwireless | |
parent | moxa: dcd handling of CLOCAL is backwards (diff) | |
download | linux-d1519e23c2b3a518fb41daf3eceae43382433ceb.tar.xz linux-d1519e23c2b3a518fb41daf3eceae43382433ceb.zip |
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>
Diffstat (limited to 'drivers/tty/ipwireless')
-rw-r--r-- | drivers/tty/ipwireless/network.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/ipwireless/network.c b/drivers/tty/ipwireless/network.c index 57102e66165a..c0dfb642383b 100644 --- a/drivers/tty/ipwireless/network.c +++ b/drivers/tty/ipwireless/network.c @@ -352,6 +352,8 @@ static struct sk_buff *ipw_packet_received_skb(unsigned char *data, } skb = dev_alloc_skb(length + 4); + if (skb == NULL) + return NULL; skb_reserve(skb, 2); memcpy(skb_put(skb, length), data, length); @@ -397,7 +399,8 @@ void ipwireless_network_packet_received(struct ipw_network *network, /* Send the data to the ppp_generic module. */ skb = ipw_packet_received_skb(data, length); - ppp_input(network->ppp_channel, skb); + if (skb) + ppp_input(network->ppp_channel, skb); } else spin_unlock_irqrestore(&network->lock, flags); |