public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Tuo Li <islituo@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tuo Li <islituo@gmail.com>
Subject: Re: [PATCH] wifi: ath9k: add a defensive NULL check to prevent null-pointer dereference in ath9k_beacon_remove_slot()
Date: Wed, 07 Jan 2026 11:03:34 +0100	[thread overview]
Message-ID: <87eco14u4p.fsf@toke.dk> (raw)
In-Reply-To: <20260107031203.170628-1-islituo@gmail.com>

Tuo Li <islituo@gmail.com> writes:

> In this function, bf is guarded by an if statement, indicating that it may
> be NULL:
>
>   if (bf && bf->bf_mpdu) {...}
>
> If bf is NULL, calling list_add_tail() may result in a null-pointer
> dereference:
>
>   list_add_tail(&bf->list, &sc->beacon.bbuf);
>
> Therefore, add a defensive NULL check before invoking list_add_tail() to
> prevent this issue.
>
> Signed-off-by: Tuo Li <islituo@gmail.com>

Are you fixing an actual bug here? Otherwise, this is not worth the
churn...

-Toke

  reply	other threads:[~2026-01-07 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  3:12 [PATCH] wifi: ath9k: add a defensive NULL check to prevent null-pointer dereference in ath9k_beacon_remove_slot() Tuo Li
2026-01-07 10:03 ` Toke Høiland-Jørgensen [this message]
2026-01-08 13:41   ` Tuo Li

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=87eco14u4p.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=islituo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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