projects/linux·commit 533c5454

Merge tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

533c5454 · Linus Torvalds <[email protected]> · 2023-05-14 12:32:34 -07:00

Pull compute express link fixes from Dan Williams:

 - Fix a compilation issue with DEFINE_STATIC_SRCU() in the unit tests

 - Fix leaking kernel memory to a root-only sysfs attribute

* tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl: Add missing return to cdat read error path
  tools/testing/cxl: Use DEFINE_STATIC_SRCU()
Commit
533c54547153d46c0bf99ac0e396bed71f760c03
Parents
838a8548 · 764d102e

Merge commit. Changes below are compared with the first parent: 838a8548.

Changes

2 files changed · +2 −1

FileStatusAddDelContent
drivers/cxl/core/pci.cmodified+1−0View file
tools/testing/cxl/test/mock.cmodified+1−1View file

drivers/cxl/core/pci.c

View file
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index bdbd907..f332fe7 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -571,6 +571,7 @@ void read_cdat_data(struct cxl_port *port)
/* Don't leave table data allocated on error */
devm_kfree(dev, cdat_table);
dev_err(dev, "CDAT data read error\n");
+ return;
}
port->cdat.table = cdat_table + sizeof(__le32);

tools/testing/cxl/test/mock.c

View file
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index c4e53f2..de3933a 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -19,7 +19,7 @@ void register_cxl_mock_ops(struct cxl_mock_ops *ops)
}
EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
-static DEFINE_SRCU(cxl_mock_srcu);
+DEFINE_STATIC_SRCU(cxl_mock_srcu);
void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
{