1 Sep 2011 14:21
[PATCH 1/1 -next] 6LoWPAN: fix skb_copy call
This patch fixes 2 issues in lowpan_skb_deliver function: 1. Check for return status of skb_copy call; 2. Use skb_copy with proper GFP flag depending on context. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...> --- net/ieee802154/6lowpan.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index cf304cc..cac1361 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c <at> <at> -477,9 +477,15 <at> <at> static int lowpan_skb_deliver(struct sk_buff *skb, struct ipv6hdr *hdr) struct sk_buff *new; struct lowpan_dev_record *entry; int stat = NET_RX_SUCCESS; + gfp_t mask; - new = skb_copy_expand(skb, sizeof(struct ipv6hdr), skb_tailroom(skb), - GFP_KERNEL); + if (in_interrupt()) + mask = GFP_ATOMIC; + else + mask = GFP_KERNEL; + + new = skb_copy_expand(skb, sizeof(struct ipv6hdr), + skb_tailroom(skb), mask); kfree_skb(skb);(Continue reading)
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.
RSS Feed