netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <netdev@vger.kernel.org>, <jdmason@kudzu.us>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<leon@kernel.org>
Subject: Re: [PATCH net v4] ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
Date: Thu, 8 Dec 2022 08:47:53 -0800	[thread overview]
Message-ID: <20221208084753.6523ff23@kernel.org> (raw)
In-Reply-To: <20221208120121.2076486-1-yangyingliang@huawei.com>

On Thu, 8 Dec 2022 20:01:21 +0800 Yang Yingliang wrote:
> It is not allowed to call kfree_skb() or consume_skb() from hardware
> interrupt context or with hardware interrupts being disabled.
> 
> It should use dev_kfree_skb_irq() or dev_consume_skb_irq() instead.
> The difference between them is free reason, dev_kfree_skb_irq() means
> the SKB is dropped in error and dev_consume_skb_irq() means the SKB
> is consumed in normal.
> 
> In this case, dev_kfree_skb() is called in free_tx_buffers() to drop
> the SKBs in tx buffers, when the card is down, so replace it with
> dev_kfree_skb_irq() here.

Make sure you read this:

https://www.kernel.org/doc/html/next/process/maintainer-netdev.html

  reply	other threads:[~2022-12-08 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 12:01 [PATCH net v4] ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-08 16:47 ` Jakub Kicinski [this message]
2022-12-12  1:58   ` Yang Yingliang
2022-12-12  9:40 ` patchwork-bot+netdevbpf

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=20221208084753.6523ff23@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jdmason@kudzu.us \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yangyingliang@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;
as well as URLs for NNTP newsgroup(s).