mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "luobin (L)" <luobin9@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <luoxianjun@huawei.com>,
	<yin.yinshi@huawei.com>, <cloud.wangxiaoyun@huawei.com>,
	<chiqijun@huawei.com>
Subject: Re: [PATCH net] hinic: fix rewaking txq after netif_tx_disable
Date: Tue, 8 Sep 2020 23:25:41 +0800	[thread overview]
Message-ID: <695897ce-9edd-d5cb-12c7-d0c8080bd4e6@huawei.com> (raw)
In-Reply-To: <20200907142834.368b9bae@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 2020/9/8 5:28, Jakub Kicinski wrote:
> On Mon, 7 Sep 2020 22:15:16 +0800 Luo bin wrote:
>> When calling hinic_close in hinic_set_channels, all queues are
>> stopped after netif_tx_disable, but some queue may be rewaken in
>> free_tx_poll by mistake while drv is handling tx irq. If one queue
>> is rewaken core may call hinic_xmit_frame to send pkt after
>> netif_tx_disable within a short time which may results in accessing
>> memory that has been already freed in hinic_close. So we judge
>> whether the netdev is in down state before waking txq in free_tx_poll
>> to fix this bug.
> 
> The right fix is to call napi_disable() _before_ you call
> netif_tx_disable(), not after, like hinic_close() does.
> .
> 
Will fix. Thanks for your review.

      reply	other threads:[~2020-09-08 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 14:15 Luo bin
2020-09-07 21:28 ` Jakub Kicinski
2020-09-08 15:25   ` luobin (L) [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=695897ce-9edd-d5cb-12c7-d0c8080bd4e6@huawei.com \
    --to=luobin9@huawei.com \
    --cc=chiqijun@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoxianjun@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=yin.yinshi@huawei.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®