Patch "cxl/hdm: Fix a benign lockdep splat" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cxl/hdm: Fix a benign lockdep splat

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cxl-hdm-fix-a-benign-lockdep-splat.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 36a1c2ee50f573972aea3c3019555f47ee0094c0 Mon Sep 17 00:00:00 2001
From: Dave Jiang <dave.jiang@xxxxxxxxx>
Date: Fri, 17 Nov 2023 13:18:48 -0700
Subject: cxl/hdm: Fix a benign lockdep splat

From: Dave Jiang <dave.jiang@xxxxxxxxx>

commit 36a1c2ee50f573972aea3c3019555f47ee0094c0 upstream.

The new helper "cxl_num_decoders_committed()" added a lockdep assertion
to validate that port->commit_end is protected against modification.
That assertion fires in init_hdm_decoder() where it is initializing
port->commit_end. Given that it is both accessing and writing that
property it obstensibly needs the lock.

In practice, CXL decoder commit rules (must commit in order) and the
in-order discovery of device decoders makes the manipulation of
->commit_end in init_hdm_decoder() safe. However, rather than rely on
the subtle rules of CXL hardware, just make the implementation obviously
correct from a software perspective.

The Fixes: tag is only for cleaning up a lockdep splat, there is no
functional issue addressed by this fix.

Fixes: 458ba8189cb4 ("cxl: Add cxl_decoders_committed() helper")
Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Link: https://lore.kernel.org/r/170025232811.2147250.16376901801315194121.stgit@djiang5-mobl3
Acked-by: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/cxl/core/hdm.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -848,6 +848,8 @@ static int init_hdm_decoder(struct cxl_p
 			cxld->target_type = CXL_DECODER_HOSTONLYMEM;
 		else
 			cxld->target_type = CXL_DECODER_DEVMEM;
+
+		guard(rwsem_write)(&cxl_region_rwsem);
 		if (cxld->id != cxl_num_decoders_committed(port)) {
 			dev_warn(&port->dev,
 				 "decoder%d.%d: Committed out of order\n",


Patches currently in stable-queue which might be from dave.jiang@xxxxxxxxx are

queue-6.6/cxl-add-cxl_decoders_committed-helper.patch
queue-6.6/cxl-core-always-hold-region_rwsem-while-reading-pois.patch
queue-6.6/cxl-pmu-ensure-put_device-on-pmu-devices.patch
queue-6.6/kernel-resource-increment-by-align-value-in-get_free.patch
queue-6.6/cxl-add-cxl_num_decoders_committed-usage-to-cxl_test.patch
queue-6.6/dmaengine-idxd-protect-int_handle-field-in-hw-descri.patch
queue-6.6/cxl-hdm-fix-a-benign-lockdep-splat.patch
queue-6.6/cxl-memdev-hold-region_rwsem-during-inject-and-clear-poison-ops.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux