All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Yeounsu Moon <yyyynoom@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dlink: use dev_kfree_skb_any instead of dev_kfree_skb
Date: Sat, 4 Oct 2025 10:54:21 +0100	[thread overview]
Message-ID: <20251004095421.GC3060232@horms.kernel.org> (raw)
In-Reply-To: <DD8MONMKM9ZD.1PT79LGCA7U06@gmail.com>

On Fri, Oct 03, 2025 at 07:51:25PM +0900, Yeounsu Moon wrote:
> On Fri Oct 3, 2025 at 5:17 PM KST, Simon Horman wrote:
> > On Fri, Oct 03, 2025 at 11:23:00AM +0900, Yeounsu Moon wrote:
> >> Replace `dev_kfree_skb()` with `dev_kfree_skb_any()` in `start_xmit()`
> >> which can be called from hard irq context (netpoll) and from other
> >> contexts.
> >> 
> >> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> >> Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
> >> Tested-on: D-Link DGE-550T Rev-A3
> >
> > Hi,
> Hello, Simon!
> >
> > I am curious to know why this problem has come up now.
> This came up because I have the hardware and recently dug into the code.
> Until then, it was not considered an issue, because nobody raised it as
> such.
> > Or more to the point, why it has not come up since the cited commit
> > was made, 20 years ago.
> I think there are two combined reasons why it has not surfaced for two
> decades:
> 1. very few people actually had this device/driver in use.
> 2. The problem is difficult to reproduce: one must use `netpoll`, and at
> the same time the `link_speed` must drop to zero.
> >
> > I am also curious to know how the problem was found.
> > By inspection? Through testing? Other?
> While looking at the `dl2k.c` code, I noticed that its logic calls
> either `dev_kfree_skb()` or `dev_consume_skb_irq()` depending on
> interrupt context. That logic gave me the sense that a similar issue
> could exist elsewhere.
> >
> > ...
> And read other driver codes and commit messages, check `networking/netdevices`
> (.ndo_start_xmit), enable `netpoll` and set up  `netconsole`, read
> `net/core/netpoll.c`, read comment in `include/linux/netdevice.h`,
> add countless `printk()`s, build millions of times... and so on.

Hi Yeounsu,

Thanks for your detailed response.

I do think it would be useful to add something like this to the commit
message:

  Found by inspection.

But in any case, this patch looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>



  reply	other threads:[~2025-10-04  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03  2:23 [PATCH net] net: dlink: use dev_kfree_skb_any instead of dev_kfree_skb Yeounsu Moon
2025-10-03  8:17 ` Simon Horman
2025-10-03 10:51   ` Yeounsu Moon
2025-10-04  9:54     ` Simon Horman [this message]
2025-10-04 11:45       ` Yeounsu Moon

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=20251004095421.GC3060232@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yyyynoom@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.