Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Wong Boon Jhee <wongboonjhee52@gmail.com>
Cc: netdev@vger.kernel.org, sam@mendozajonas.com
Subject: Re: [PATCH v4] net/ncsi: Fix Use-After-Free in NCSI channel and package removal
Date: Tue, 8 Sep 2026 17:53:23 -0700	[thread overview]
Message-ID: <20260908175323.3cb83f5f@kernel.org> (raw)
In-Reply-To: <20260905145902.345090-1-wongboonjhee52@gmail.com>

On Sat,  5 Sep 2026 22:59:02 +0800 Wong Boon Jhee wrote:
> In net/ncsi/ncsi-manage.c, ncsi_remove_channel() and
> ncsi_remove_package() remove objects from an RCU-protected linked list
> using list_del_rcu() and immediately free them using kfree().

../net/ncsi/ncsi-manage.c:45:16: warning: unused variable 'flags' [-Wunused-variable]
   45 |         unsigned long flags;
      |                       ^~~~~
../net/ncsi/ncsi-manage.c:906:8: warning: variable 'flags' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  906 |                         if (ncm->enable)
      |                             ^~~~~~~~~~~
../net/ncsi/ncsi-manage.c:941:37: note: uninitialized use occurs here
  941 |         spin_unlock_irqrestore(&ndp->lock, flags);
      |                                            ^~~~~
../net/ncsi/ncsi-manage.c:906:4: note: remove the 'if' if its condition is always false
  906 |                         if (ncm->enable)
      |                         ^~~~~~~~~~~~~~~~
  907 |                                 goto out_false;
      |                                 ~~~~~~~~~~~~~~
../net/ncsi/ncsi-manage.c:894:21: note: initialize the variable 'flags' to silence this warning
  894 |         unsigned long flags;
      |                            ^
      |                             = 0

      parent reply	other threads:[~2026-09-09  0:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 14:59 [PATCH v4] net/ncsi: Fix Use-After-Free in NCSI channel and package removal Wong Boon Jhee
2026-09-08 13:49 ` Simon Horman
2026-09-09  0:53 ` Jakub Kicinski [this message]

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=20260908175323.3cb83f5f@kernel.org \
    --to=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sam@mendozajonas.com \
    --cc=wongboonjhee52@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