Skip to content

Commit

Permalink
Merge branch 'rmnet-fixes'
Browse files Browse the repository at this point in the history
Subash Abhinov Kasiviswanathan says:

====================
net: qualcomm: rmnet: Updates 2018-10-02

This series is a set of small fixes for rmnet driver

Patch 1 is a fix for a scenario reported by syzkaller
Patch 2 & 3 are fixes for incorrect allocation flags
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 3, 2018
2 parents 45ec318 + ec40564 commit 31c73cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ rmnet_map_ingress_handler(struct sk_buff *skb,
struct sk_buff *skbn;

if (skb->dev->type == ARPHRD_ETHER) {
if (pskb_expand_head(skb, ETH_HLEN, 0, GFP_KERNEL)) {
if (pskb_expand_head(skb, ETH_HLEN, 0, GFP_ATOMIC)) {
kfree_skb(skb);
return;
}
Expand Down Expand Up @@ -147,7 +147,7 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
}

if (skb_headroom(skb) < required_headroom) {
if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL))
if (pskb_expand_head(skb, required_headroom, 0, GFP_ATOMIC))
return -ENOMEM;
}

Expand Down Expand Up @@ -189,6 +189,9 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
if (!skb)
goto done;

if (skb->pkt_type == PACKET_LOOPBACK)
return RX_HANDLER_PASS;

dev = skb->dev;
port = rmnet_get_port(dev);

Expand Down

0 comments on commit 31c73cb

Please sign in to comment.