Re: [PATCH] dm: crash dump: remove redundant NULL check before kvfree()

Pratyush Yadav <[email protected]>
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Fri, Jul 03 2026, Coiby Xu wrote:

> On Fri, Jul 03, 2026 at 02:03:32PM +0200, Pratyush Yadav wrote:
>>On Fri, Jul 03 2026, [email protected] wrote:
>>
>>> From: Mohammad Shahid <[email protected]>
>>>
>>> kvfree() safely handles NULL pointers, so the explicit NULL check
>>> before calling kvfree() is unnecessary.
>>>
>>> This issue was reported by ifnullfree.cocci.
>>>
>>> Signed-off-by: Mohammad Shahid <[email protected]>
>>
>>Reviewed-by: Pratyush Yadav <[email protected]>
>
> Hi Pratyush,
>
> Thanks for reviewing this patch!
>
>>
>>BTW, Sashiko [0] pointed out a bunch of problems in the surrounding code,
>>and they seem to look legit. If you're interested, help in fixing them
>>would be much appreciated.
>>
>>[0] https://sashiko.dev/#/patchset/[email protected]
>
> I'll send a new version of
> https://lore.kernel.org/kexec/[email protected]/
> soon which can address Sashiko's feedback scrutinized by Sourabh.

Oh, great. Thanks!

-- 
Regards,
Pratyush Yadav
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.