From: John Fastabend <john.fastabend@gmail.com>
To: David Miller <davem@davemloft.net>, weiyongjun1@huawei.com
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3] net: sched: fix skb leak in dev_requeue_skb()
Date: Tue, 2 Jan 2018 13:34:12 -0800 [thread overview]
Message-ID: <fd9c1d67-235d-258e-7d49-5e02cf629e49@gmail.com> (raw)
In-Reply-To: <20180102.134911.1471297664330738902.davem@davemloft.net>
On 01/02/2018 10:49 AM, David Miller wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Date: Wed, 27 Dec 2017 17:05:52 +0800
>
>> When dev_requeue_skb() is called with bluked skb list, only the
> ^^^^^^
>
> "bulked"
>
>> 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 <weiyongjun1@huawei.com>
>> ---
>> v2 -> v3: move lock out of while loop
>
> Applied, thank you.
>
Bit late on my review but LGTM thanks!
prev parent reply other threads:[~2018-01-02 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 9:05 [PATCH net-next v3] net: sched: fix skb leak in dev_requeue_skb() Wei Yongjun
2018-01-02 18:49 ` David Miller
2018-01-02 21:34 ` John Fastabend [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd9c1d67-235d-258e-7d49-5e02cf629e49@gmail.com \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox