From: Dave Jiang <dave.jiang@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <linux-cxl@vger.kernel.org>, <dan.j.williams@intel.com>,
<ira.weiny@intel.com>, <vishal.l.verma@intel.com>,
<alison.schofield@intel.com>, <Jonathan.Cameron@huawei.com>,
<peterz@infradead.org>
Subject: Re: [PATCH v3] cxl: Add cxl_region_rwsem around commit_end write during decoder enumeration
Date: Mon, 20 Nov 2023 10:04:37 -0700 [thread overview]
Message-ID: <e9a0c8bb-c49d-4632-bafc-34993778423e@intel.com> (raw)
In-Reply-To: <jhsumngltwjkwpa2o2ktxwjujmuzdzrza2m4fyd44ieva3l2ca@trrhklq6evtg>
On 11/20/23 09:04, Davidlohr Bueso wrote:
> On Fri, 17 Nov 2023, Dave Jiang wrote:
>
>> init_hdm_decoder() modifies port->commit_end without taking the
>> cxl_region_rwsem. An assert splat emitted by cxl_num_decoders_committed().
>> However looking at the code, it looks like the write version of the rwsem
>> needs to be taken due to the modification of commit_end. Wrap the write
>> version of the rwsem around reading and writing of commit_end.
>>
>> Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware")
>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>
> Uhmm but do we expect concurrency during the switch/port probing phase?
I would assume so, which makes the protection necessary no?
>
> Thanks,
> Davidlohr
next prev parent reply other threads:[~2023-11-20 17:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 20:18 [PATCH v3] cxl: Add cxl_region_rwsem around commit_end write during decoder enumeration Dave Jiang
2023-11-20 16:04 ` Davidlohr Bueso
2023-11-20 17:04 ` Dave Jiang [this message]
2023-11-22 21:43 ` Dan Williams
2023-11-23 1:02 ` Dan Williams
2023-11-27 17:09 ` Dave Jiang
2023-11-27 17:39 ` Davidlohr Bueso
2023-11-30 1:01 ` Dan Williams
2023-11-30 16:15 ` Davidlohr Bueso
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=e9a0c8bb-c49d-4632-bafc-34993778423e@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=vishal.l.verma@intel.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