[ldv-project] [PATCH] AMD_SFH: Fix potential NULL pointer dereference

Basavaraj Natikar bnatikar at amd.com
Thu Sep 16 08:59:32 MSK 2021


On 9/15/2021 11:02 PM, Shah, Nehal-bakulchandra wrote:
> Adding Basavaraj
>
> -----Original Message-----
> From: Jiri Kosina <jikos at kernel.org> 
> Sent: Wednesday, September 15, 2021 8:28 PM
> To: Evgeny Novikov <novikov at ispras.ru>
> Cc: Shah, Nehal-bakulchandra <Nehal-bakulchandra.Shah at amd.com>; Sandeep Singh <sandeep.singh at amd.com>; Benjamin Tissoires <benjamin.tissoires at redhat.com>; linux-input at vger.kernel.org; linux-kernel at vger.kernel.org; ldv-project at linuxtesting.org
> Subject: Re: [PATCH] AMD_SFH: Fix potential NULL pointer dereference
>
> On Tue, 1 Jun 2021, Evgeny Novikov wrote:
>
>> devm_add_action_or_reset() can suddenly invoke amd_mp2_pci_remove() at 
>> registration that will cause NULL pointer dereference since 
>> corresponding data is not initialized yet. The patch moves 
>> initialization of data before devm_add_action_or_reset().
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Evgeny Novikov <novikov at ispras.ru>
> Nehal, Basavaraj, could you please Review/Ack this one?
>
Patch looks good to me. Acked-by: Basavaraj Natikar <Basavaraj.Natikar at amd.com>




More information about the ldv-project mailing list