diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-30 11:12:21 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-30 11:12:21 -0700 |
commit | 4b280531e84cd6350c3b611de600ef2d47351bbb (patch) | |
tree | 06ebaa54d4e1878de271ddfa7a656e948062bafa /drivers | |
parent | f2696099c6c619aec4fe2b9691f0a81429957e65 (diff) | |
parent | 458bf2f224f04a513b0be972f8708e78ee2c986e (diff) | |
download | linux-stable-4b280531e84cd6350c3b611de600ef2d47351bbb.tar.gz linux-stable-4b280531e84cd6350c3b611de600ef2d47351bbb.tar.bz2 linux-stable-4b280531e84cd6350c3b611de600ef2d47351bbb.zip |
Merge branch 'XDP-generic-fixes'
Stephen Hemminger says:
====================
XDP generic fixes
This set of patches came about while investigating XDP
generic on Azure. The split brain nature of the accelerated
networking exposed issues with the stack device model.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 06393b215102..9873b8679f81 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -2000,6 +2000,12 @@ static rx_handler_result_t netvsc_vf_handle_frame(struct sk_buff **pskb) struct netvsc_vf_pcpu_stats *pcpu_stats = this_cpu_ptr(ndev_ctx->vf_stats); + skb = skb_share_check(skb, GFP_ATOMIC); + if (unlikely(!skb)) + return RX_HANDLER_CONSUMED; + + *pskb = skb; + skb->dev = ndev; u64_stats_update_begin(&pcpu_stats->syncp); |