lkml.org 
[lkml]   [2021]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5] PCI: endpoint: Fix NULL pointer dereference for ->get_features()
Date
On Wed, 24 Mar 2021 15:46:09 +0530, Shradha Todi wrote:
> get_features ops of pci_epc_ops may return NULL, causing NULL pointer
> dereference in pci_epf_test_alloc_space function. Let us add a check for
> pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid
> any such NULL pointer dereference and return -ENOTSUPP in case
> pci_epc_feature is not found.
>
> When the patch is not applied and EPC features is not implemented in the
> platform driver, we see the following dump due to kernel NULL pointer
> dereference.
>
> [...]

Applied to pci/endpoint, thanks!

[1/1] PCI: endpoint: Fix NULL pointer dereference for ->get_features()
https://git.kernel.org/lpieralisi/pci/c/6613bc2301

Thanks,
Lorenzo

\
 
 \ /
  Last update: 2021-03-26 16:24    [W:0.022 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site