mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vishwanath Pai <vpai@akamai.com>
To: Yunsheng Lin <linyunsheng@huawei.com>,
	gregkh@linuxfoundation.org, stable@vger.kernel.org
Cc: Joakim.Tjernlund@infinera.com, xiyou.wangcong@gmail.com,
	johunt@akamai.com, jhs@mojatatu.com, jiri@resnulli.us,
	davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	john.fastabend@gmail.com, eric.dumazet@gmail.com,
	dsahern@gmail.com
Subject: Re: [PATCH stable] net: sch_generic: fix the missing new qdisc assignment bug
Date: Tue, 3 Nov 2020 10:46:28 -0500	[thread overview]
Message-ID: <aed8d765-6ac7-bc8b-b8c2-e2c8832865bf@akamai.com> (raw)
In-Reply-To: <1604373938-211588-1-git-send-email-linyunsheng@huawei.com>

On 11/2/20 10:25 PM, Yunsheng Lin wrote:
 > commit 2fb541c862c9 ("net: sch_generic: aviod concurrent reset and 
enqueue op for lockless qdisc")
 >
 > When the above upstream commit is backported to stable kernel,
 > one assignment is missing, which causes two problems reported
 > by Joakim and Vishwanath, see [1] and [2].
 >
 > So add the assignment back to fix it.
 >
 > 1. 
https://urldefense.com/v3/__https://www.spinics.net/lists/netdev/msg693916.html__;!!GjvTz_vk!AqzcoNtwXeDu-vDNRKnOiOWYmi4B-2atZZExjZTvpp2jeJ9asOyQBVUtQyBp$
 > 2. 
https://urldefense.com/v3/__https://www.spinics.net/lists/netdev/msg695131.html__;!!GjvTz_vk!AqzcoNtwXeDu-vDNRKnOiOWYmi4B-2atZZExjZTvpp2jeJ9asOyQBQlaitCQ$
 >
 > Fixes: 749cc0b0c7f3 ("net: sch_generic: aviod concurrent reset and 
enqueue op for lockless qdisc")
 > Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
 > ---
 >  net/sched/sch_generic.c | 3 +++
 >  1 file changed, 3 insertions(+)
 >
 > diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
 > index 0e275e1..6e6147a 100644
 > --- a/net/sched/sch_generic.c
 > +++ b/net/sched/sch_generic.c
 > @@ -1127,10 +1127,13 @@ static void dev_deactivate_queue(struct 
net_device *dev,
 >                   void *_qdisc_default)
 >  {
 >      struct Qdisc *qdisc = rtnl_dereference(dev_queue->qdisc);
 > +    struct Qdisc *qdisc_default = _qdisc_default;
 >
 >      if (qdisc) {
 >          if (!(qdisc->flags & TCQ_F_BUILTIN))
 >              set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state);
 > +
 > +        rcu_assign_pointer(dev_queue->qdisc, qdisc_default);
 >      }
 >  }
 >

I have tested the patch on v5.4.71 and it fixes our issues.

Tested-by: Vishwanath Pai <vpai@akamai.com>


  reply	other threads:[~2020-11-03 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  3:25 Yunsheng Lin
2020-11-03 15:46 ` Vishwanath Pai [this message]
2020-11-03 19:06 ` Jakub Kicinski
2020-11-09 12:46 ` Greg KH
2020-11-10  0:58   ` Yunsheng Lin
2020-11-17 12:09     ` Greg KH
2020-11-13  3:51 ` Brian Norris

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=aed8d765-6ac7-bc8b-b8c2-e2c8832865bf@akamai.com \
    --to=vpai@akamai.com \
    --cc=Joakim.Tjernlund@infinera.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=johunt@akamai.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linyunsheng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®