[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ff977e8e-f832-d38d-a6d8-4510d08bf306@lwfinger.net>
Date: Fri, 10 Feb 2023 13:17:12 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: Natalia Petrova <n.petrova@...tech.ru>
Cc: Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH] b43legacy: Add checking for null for
ssb_get_devtypedata(dev)
On 2/10/23 05:12, Natalia Petrova wrote:
> Function ssb_get_devtypedata(dev) may return null (next call
> B43legacy_WARN_ON(!wl) is used for error handling, including null-value).
> Therefore, a check is added before calling b43legacy_wireless_exit(),
> where the argument containing this value is expected to be dereferenced.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE
>
> Fixes: 75388acd0cd8 ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices")
> Signed-off-by: Natalia Petrova <n.petrova@...tech.ru>
> ---
> drivers/net/wireless/broadcom/b43legacy/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
> index 760136638a95..1ae65679d704 100644
> --- a/drivers/net/wireless/broadcom/b43legacy/main.c
> +++ b/drivers/net/wireless/broadcom/b43legacy/main.c
> @@ -3871,7 +3871,7 @@ static int b43legacy_probe(struct ssb_device *dev,
> return err;
>
> err_wireless_exit:
> - if (first)
> + if (first && wl)
> b43legacy_wireless_exit(dev, wl);
> return err;
> }
Looks good to me.
Acked-by: Larry Finger <Larry.Finger@...il.com>
Thanks,
Larry
Powered by blists - more mailing lists