mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jeff Garzik <jeff@garzik.org>,
	Roland Dreier <rdreier@cisco.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: ibm: emac: mal: fix potential system hang in mal_remove()
Date: Tue, 9 Jun 2026 15:07:36 -0700	[thread overview]
Message-ID: <53959e5a-1e9c-482f-ad4a-595e576c5ba5@intel.com> (raw)
In-Reply-To: <CAKxU2N-0RnWV_BxQMX=ofcoH947L3icyKqReO7rf_4Q8tO2CSA@mail.gmail.com>

On 6/8/2026 6:51 PM, Rosen Penev wrote:
> On Mon, Jun 8, 2026 at 6:14 PM Jacob Keller <jacob.e.keller@intel.com> wrote:
>>
>> On 6/8/2026 5:36 PM, Jakub Kicinski wrote:
>>> On Thu, 4 Jun 2026 16:03:43 -0700 Rosen Penev wrote:
>>>>>> -     if (!list_empty(&mal->list))
>>>>>> +     if (!list_empty(&mal->list)) {
>>>>>> +             napi_disable(&mal->napi);
>>>>>>               /* This is *very* bad */
>>>>>>               WARN(1, KERN_EMERG
>>>>>>                      "mal%d: commac list is not empty on remove!\n",
>>>>>>                      mal->index);
>>>>>
>>>>> This one doesn't make sense to me. The list_empty check does a WARN()
>>>>> indicating that this is not supposed to happen.
>>>>>
>>>>> This implies that list_empty should be true, otherwise we'd see a WARN
>>>>> every time mal_remove is called.
>>>>>
>>>>> But in that case, we'd have been calling napi_disable incorrectly in
>>>>> most cases where it was previously unsafe according to your claim.
>>>>>
>>>>> At best, this list_empty check is the wrong way to tell if the napi is
>>>>> disabled, at worst, this whole change is pointless.
>>>> I asked the AI. It doesn't agree:
>>>
>>> FTR I agree with Jake, the patch seems to indicate bigger structural
>>> issues. Then again I don't want to encourage the stream of patches
>>> to this driver so let me just apply this..
>>
>> I don't see how applying this discourages the stream of patches?
>> Wouldn't that be encouraging?
>>
>> Or I guess the patch "does" fix something (an extra call to
>> napi_disable) and you don't want to encourage a raff of future changes
>> to try and fix the overall structural issues? I guess that makes sense.
>>
>> I still don't follow how this fixes
> I don't either. But runtime testing shows it to be an improvement.
> 

If you have runtime testing to back this up, then please ignore my
objections :)

I think I'd be happier with just the removal of napi_disable from
mal_remove(), and not trying to modify the list_empty WARN block, but
thats only because it does seem obvious that the existing napi_disable
shouldn't be called there (as it was called when the last item was
removed from mal->list).

> Anyway, it seems various subsystem maintainers want me to fix
> pre-existing issues reported by sashiko.
> 
> I also got this feedback previously:
> https://lore.kernel.org/netdev/20260107185605.7932173f@kernel.org/

  reply	other threads:[~2026-06-09 22:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 23:08 Rosen Penev
2026-06-04 18:52 ` Jacob Keller
2026-06-04 23:03   ` Rosen Penev
2026-06-09  0:36     ` Jakub Kicinski
2026-06-09  1:13       ` Jacob Keller
2026-06-09  1:13       ` Jacob Keller
2026-06-09  1:51         ` Rosen Penev
2026-06-09 22:07           ` Jacob Keller [this message]
2026-06-09  0: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=53959e5a-1e9c-482f-ad4a-595e576c5ba5@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jeff@garzik.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rdreier@cisco.com \
    --cc=rosenp@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®