From: Dave Jiang <dave.jiang@intel.com>
To: Li Ming <ming.li@zohomail.com>,
Alison Schofield <alison.schofield@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-cxl@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ira Weiny <ira.weiny@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Danilo Krummrich <dakr@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ben Cheatham <benjamin.cheatham@amd.com>
Subject: Re: [PATCH v2 2/4] cxl/memdev: Hold memdev lock during memdev poison injection/clear
Date: Wed, 18 Mar 2026 08:36:31 -0700 [thread overview]
Message-ID: <dfc0979a-b01a-4c90-8bc8-7a60fb795dc7@intel.com> (raw)
In-Reply-To: <d2ed94ec-e5c7-4b6b-9fe8-68f22bd632ad@zohomail.com>
On 3/18/26 4:59 AM, Li Ming wrote:
>
> 在 2026/3/17 23:00, Dave Jiang 写道:
>>
>> On 3/14/26 12:06 AM, Li Ming wrote:
>>> CXL memdev poison injection/clearing debugfs interfaces are visible
>>> before the CXL memdev endpoint initialization, If user accesses the
>>> interfaces before cxlmd->endpoint updated, it is possible to access an
>>> invalid endpoint in cxl_dpa_to_region().
>>>
>>> Hold CXL memdev lock at the beginning of the interfaces, this blocks the
>>> interfaces until CXL memdev probing completed.
>>>
>>> The following patch will check the given endpoint validity in
>>> cxl_dpa_to_region().
>>>
>>> Suggested-by: Dan Williams <dan.j.williams@intel.com>
>>> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
>>> Reviewed-by: Alison Schofield <alison.schofield@intel.com>
>>> Signed-off-by: Li Ming <ming.li@zohomail.com>
>> Hi Ming, I dropped this patch with Dan's comments [1] and updated cxl/next. Please check and make sure everything looks ok to you. Thanks!
>>
>> [1]: https://lore.kernel.org/linux-cxl/69b8b81621e16_452b100e@dwillia2-mobl4.notmuch/
>
> Hi Dave,
>
> I think there is no change needed in this patch, just need a independent patch for holding memdev lock in cxl_region_debugfs_poison_inject/clear.
>
> Or you want to review this patch again?
No. Maybe I misunderstood the comment from Dan. So we should keep this patch?
DJ
next prev parent reply other threads:[~2026-03-18 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 7:06 [PATCH v2 0/4] cxl: Consolidate cxlmd->endpoint accessing Li Ming
2026-03-14 7:06 ` [PATCH v2 1/4] driver core: Add conditional guard support for device_lock() Li Ming
2026-03-14 7:06 ` [PATCH v2 2/4] cxl/memdev: Hold memdev lock during memdev poison injection/clear Li Ming
2026-03-17 15:00 ` Dave Jiang
2026-03-18 11:59 ` Li Ming
2026-03-18 15:36 ` Dave Jiang [this message]
2026-03-19 11:10 ` Li Ming
2026-04-11 19:23 ` Dan Williams
2026-03-14 7:06 ` [PATCH v2 3/4] cxl/pci: Hold memdev lock in cxl_event_trace_record() Li Ming
2026-03-14 7:06 ` [PATCH v2 4/4] cxl/pci: Check memdev driver binding status in cxl_reset_done() Li Ming
2026-03-16 17:57 ` [PATCH v2 0/4] cxl: Consolidate cxlmd->endpoint accessing Dave Jiang
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=dfc0979a-b01a-4c90-8bc8-7a60fb795dc7@intel.com \
--to=dave.jiang@intel.com \
--cc=alison.schofield@intel.com \
--cc=benjamin.cheatham@amd.com \
--cc=bhelgaas@google.com \
--cc=dakr@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=rafael@kernel.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