linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: linux-kernel@vger.kernel.org,
	Shradha Todi <shradha.t@samsung.com>,
	linux-pci@vger.kernel.org
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	hari.tv@samsung.com, p.rajanbabu@samsung.com,
	niyas.ahmed@samsung.com, bhelgaas@google.com,
	pankaj.dubey@samsung.com, Sriram Dash <dash.sriram@gmail.com>,
	l.mehra@samsung.com, kishon@ti.com
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: <161677217283.28772.11255664363565834754.b4-ty@arm.com> (raw)
In-Reply-To: <20210324101609.79278-1-shradha.t@samsung.com>

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

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210324101555epcas5p1b5c8ff4d99b045b94f820c2151800127@epcas5p1.samsung.com>
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=161677217283.28772.11255664363565834754.b4-ty@arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=bhelgaas@google.com \
    --cc=dash.sriram@gmail.com \
    --cc=hari.tv@samsung.com \
    --cc=kishon@ti.com \
    --cc=l.mehra@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=niyas.ahmed@samsung.com \
    --cc=p.rajanbabu@samsung.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=shradha.t@samsung.com \
    --subject='Re: [PATCH v5] PCI: endpoint: Fix NULL pointer dereference for ->get_features()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).