[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2137c5905fc87e80698e6578ebf360be6d899f6f.camel@sipsolutions.net>
Date: Mon, 26 May 2025 11:50:47 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Greg KH <greg@...ah.com>, Wentao Liang <vulab@...as.ac.cn>
Cc: luciano.coelho@...el.com, linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] mac80211: Add null pointer check for
ieee80211_link_get_chanctx()
On Mon, 2025-05-26 at 11:44 +0200, Greg KH wrote:
>
> > old_ctx = ieee80211_link_get_chanctx(link);
> > + if (WARN_ON(!old_ctx)) {
>
> You just caused the machine to crash and reboot on billions of Linux
> systems if this ever is triggered. So please never do that :(
I still very much disagree with you and _will_ keep adding warnings to
the wireless stack. This would be one of those places where it's totally
warranted, because it's actually impossible that this happens, for it to
something else would have to be changed to go wrong in how this is
called, for example.
Also, it already crashes anyway if it were NULL.
(And also, the poor patch submitter has no idea what you were talking
about.)
johannes
Powered by blists - more mailing lists