archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <>
	Shradha Todi <>,
Cc: Lorenzo Pieralisi <>,,,,,, Sriram Dash <>,,
Subject: Re: [PATCH v5] PCI: endpoint: Fix NULL pointer dereference for ->get_features()
Date: Fri, 26 Mar 2021 15:23:08 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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()


      reply	other threads:[~2021-03-26 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2021-03-24 10:16 ` Shradha Todi
2021-03-26 15:23   ` Lorenzo Pieralisi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v5] PCI: endpoint: Fix NULL pointer dereference for ->get_features()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).