linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: ukrishn@linux.vnet.ibm.com, pradghos@in.ibm.com, imunsie@au1.ibm.com
Subject: Re: [PATCH] cxl: prevent read/write to AFU config space while AFU not configured
Date: Tue, 6 Dec 2016 15:33:08 +0100	[thread overview]
Message-ID: <72b468c5-0187-07b9-79a4-2170f4d75b92@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161205132242.13517-1-andrew.donnellan@au1.ibm.com>



Le 05/12/2016 à 14:22, Andrew Donnellan a écrit :
> During EEH recovery, we deconfigure all AFUs whilst leaving the
> corresponding vPHB and virtual PCI device in place.
>
> If something attempts to interact with the AFU's PCI config space (e.g.
> running lspci) after the AFU has been deconfigured and before it's
> reconfigured, cxl_pcie_{read,write}_config() will read invalid values from
> the deconfigured struct cxl_afu and proceed to Oops when they try to
> dereference pointers that have been set to NULL during deconfiguration.
>
> Add a rwsem to struct cxl_afu so we can prevent interaction with config
> space while the AFU is deconfigured.
>
> Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
> Suggested-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
> Cc: stable@vger.kernel.org # 4.4+
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>


Thanks for adding the comments!

Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>

      parent reply	other threads:[~2016-12-06 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 13:22 [PATCH] cxl: prevent read/write to AFU config space while AFU not configured Andrew Donnellan
2016-12-06  5:52 ` Ian Munsie
2016-12-06 14:33 ` Frederic Barrat [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=72b468c5-0187-07b9-79a4-2170f4d75b92@linux.vnet.ibm.com \
    --to=fbarrat@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=pradghos@in.ibm.com \
    --cc=ukrishn@linux.vnet.ibm.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).