Thread (3 messages) 3 messages, 3 authors, 2018-01-02

Re: [PATCH net-next v3] net: sched: fix skb leak in dev_requeue_skb()

flat view

From: John Fastabend <john.fastabend@gmail.com>
Date: 2018-01-02 21:34:30

On 01/02/2018 10:49 AM, David Miller wrote:
From: Wei Yongjun <redacted>
Date: Wed, 27 Dec 2017 17:05:52 +0800
quoted
When dev_requeue_skb() is called with bluked skb list, only the
                                        ^^^^^^

"bulked"
quoted
first skb of the list will be requeued to qdisc layer, and leak
the others without free them.

TCP is broken due to skb leak since no free skb will be considered
as still in the host queue and never be retransmitted. This happend
when dev_requeue_skb() called from qdisc_restart().
  qdisc_restart
  |-- dequeue_skb
  |-- sch_direct_xmit()
      |-- dev_requeue_skb() <-- skb may bluked

Fix dev_requeue_skb() to requeue the full bluked list. Also change
to use __skb_queue_tail() in __dev_requeue_skb() to avoid skb out
of order.>>
Fixes: a53851e2c321 ("net: sched: explicit locking in gso_cpu fallback")
Signed-off-by: Wei Yongjun <redacted>
---
v2 -> v3: move lock out of while loop
Applied, thank you.
Bit late on my review but LGTM thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help