diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 09cb3f6dc40c..c0946cb2b354 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1666,7 +1666,7 @@ static inline int deliver_skb(struct sk_buff *skb, | |||
1666 | 1666 | ||
1667 | static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb) | 1667 | static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb) |
1668 | { | 1668 | { |
1669 | if (ptype->af_packet_priv == NULL) | 1669 | if (!ptype->af_packet_priv || !skb->sk) |
1670 | return false; | 1670 | return false; |
1671 | 1671 | ||
1672 | if (ptype->id_match) | 1672 | if (ptype->id_match) |
@@ -2818,8 +2818,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
2818 | if (unlikely(tcpu != next_cpu) && | 2818 | if (unlikely(tcpu != next_cpu) && |
2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || | 2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || |
2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - | 2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - |
2821 | rflow->last_qtail)) >= 0)) | 2821 | rflow->last_qtail)) >= 0)) { |
2822 | tcpu = next_cpu; | ||
2822 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); | 2823 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); |
2824 | } | ||
2823 | 2825 | ||
2824 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { | 2826 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { |
2825 | *rflowp = rflow; | 2827 | *rflowp = rflow; |