All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Andrew Lunn <andrew@lunn.ch>,
	Sebastian Roland Wolf <Sebastian.Wolf@pace-systems.de>,
	Elad Yifee <eladwf@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>, Sean Wang <sean.wang@mediatek.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Sebastian Roland Wolf <srw@root533.premium-rootserver.net>
Subject: Re: [PATCH v2] net: mediatek: add null pointer check for hardware offloading
Date: Sun, 4 Jan 2026 10:29:25 +0000	[thread overview]
Message-ID: <1814efa2-0b4c-42a5-a18a-eca5638cdd43@linux.dev> (raw)
In-Reply-To: <6491ccf8-0318-421e-ba44-1565875e374c@lunn.ch>

On 03/01/2026 08:30, Andrew Lunn wrote:
> On Sat, Jan 03, 2026 at 01:50:08AM +0100, Sebastian Roland Wolf wrote:
>> From: Sebastian Roland Wolf <srw@root533.premium-rootserver.net>
>>
>> Add a null pointer check to prevent kernel crashes when hardware
>> offloading is active on MediaTek devices.
>>
>> In some edge cases, the ethernet pointer or its associated netdev
>> element can be NULL. Checking these pointers before access is
>> mandatory to avoid segmentation faults and kernel oops.
> 
> Would it make sense to return EOPNOTSUPP, or maybe ENODEV? This does
> seem like an error case.

The if condition checks for single device only, while the code was added
with introduction of multiple PPEs. I believe we have to check multiple
devices from eth[], but the author may know better (CCed Elad Yifee)

> 
>       Andrew



  reply	other threads:[~2026-01-04 10:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-03  0:50 [PATCH v2] net: mediatek: add null pointer check for hardware offloading Sebastian Roland Wolf
2026-01-03  8:30 ` Andrew Lunn
2026-01-04 10:29   ` Vadim Fedorenko [this message]
2026-01-07 13:35 ` Simon Horman

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=1814efa2-0b4c-42a5-a18a-eca5638cdd43@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=Sebastian.Wolf@pace-systems.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=eladwf@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=srw@root533.premium-rootserver.net \
    /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.