lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251023142449.117936-1-rakuram.e96@gmail.com>
Date: Thu, 23 Oct 2025 19:54:47 +0530
From: Rakuram Eswaran <rakuram.e96@...il.com>
To: lorenzo@...nel.org
Cc: angelogioacchino.delregno@...labora.com,
	dan.carpenter@...aro.org,
	david.hunter.linux@...il.com,
	khalid@...nel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel-mentees@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	linux-mediatek@...ts.infradead.org,
	linux-wireless@...r.kernel.org,
	lkp@...el.com,
	matthias.bgg@...il.com,
	nbd@....name,
	rakuram.e96@...il.com,
	rex.lu@...iatek.com,
	ryder.lee@...iatek.com,
	sean.wang@...iatek.com,
	shayne.chen@...iatek.com,
	skhan@...uxfoundation.org
Subject: Re: [PATCH] wifi: mt76: mt7996: remove redundant NULL check in mt7996_msdu_page_get_from_cache()

On Thu, 23 Oct 2025 at 18:45, Lorenzo Bianconi <lorenzo@...nel.org> wrote:
>
> > Smatch reported a warning that the NULL check on `p` in
> > `mt7996_msdu_page_get_from_cache()` is redundant:
> >
> >   drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1651
> >   mt7996_msdu_page_get_from_cache() warn: can 'p' even be NULL?
> >
> > The function first checks `list_empty(&dev->wed_rro.page_cache)` before
> > calling `list_first_entry()`. When the list is not empty,
> > `list_first_entry()` always returns a valid pointer and can never be NULL.
> >
> > Hence, the `if (p)` condition is unnecessary. Removing it cleans up the
> > code.
>
> Hi Rakuram,
>
> this issue has been already fixed here:
> https://patchwork.kernel.org/project/linux-wireless/patch/20251014-mt7996_msdu_page_get_from_cache-remove-null-ptr-check-v1-1-fbeb7881e192@kernel.org/
>
> Regards,
> Lorenzo
>

Hello Lorenzo,

Thank you for the information. I did check both linus-mainline and linux-next
branches before sending the patch. 

>From next time, I’ll make sure to also check the subsystem-specific branches as well.

Thanks again for pointing it out.

Best regards,
Rakuram

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ