From: Dan Carpenter <error27@gmail.com>
To: Luka Gejak <luka.gejak@linux.dev>
Cc: omer.e.idrissi@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH 0/5] rtw_sdio_if1_init cleanup and small logic tweak
Date: Wed, 1 Apr 2026 13:33:38 +0300 [thread overview]
Message-ID: <acz0ghWV_WxNlcM3@stanley.mountain> (raw)
In-Reply-To: <272CEB11-DD9C-43BE-B47D-49F8BE1A0392@linux.dev>
On Wed, Apr 01, 2026 at 12:17:41PM +0200, Luka Gejak wrote:
> Hi Omer,
> Thank you for submitting this patch series. I like the idea, however
> during my review I have found that there are several issues.
>
> Patch 1:
> While the patch makes it visually cleaner, this patch introduces a
> significant risk of a kernel panic. struct net_device *pnetdev; is
> declared on the stack but not initialized to NULL. If the function
> fails early, the execution jumps to the free_adapter label. The logic
> then evaluates if (pnetdev). Since pnetdev contains uninitialized
> stack garbage, this check will likely evaluate to true, causing the
> kernel to attempt rtw_free_netdev() on a random memory address.
That's not true.
regards,
dan carpenter
next prev parent reply other threads:[~2026-04-01 10:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:17 [PATCH 0/5] rtw_sdio_if1_init cleanup and small logic tweak Luka Gejak
2026-04-01 10:29 ` Greg KH
2026-04-01 10:50 ` Greg KH
2026-04-01 10:58 ` Luka Gejak
2026-04-01 10:56 ` Luka Gejak
2026-04-01 10:33 ` Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-01 10:19 Luka Gejak
2026-03-31 20:25 Luka Gejak
2026-04-01 8:29 ` Greg KH
2026-04-01 9:46 ` Luka Gejak
2026-04-01 14:35 ` Konstantin Ryabitsev
2026-04-01 8:40 ` Krzysztof Kozlowski
2026-03-31 15:32 Omer El Idrissi
2026-04-01 1:39 ` Ethan Tidmore
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=acz0ghWV_WxNlcM3@stanley.mountain \
--to=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=luka.gejak@linux.dev \
--cc=omer.e.idrissi@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