diff options
| author | Dave Jiang <dave.jiang@intel.com> | 2026-10-01 08:47:42 -0700 |
|---|---|---|
| committer | Dave Jiang <dave.jiang@intel.com> | 2026-10-09 14:06:35 -0700 |
| commit | 019560d23450a320f4060ff235563a5277ea8033 (patch) | |
| tree | 3523dfa399434c2f761eaa83118b6d7967b95f41 /tools/perf/scripts/python/netdev-times.py | |
| parent | 371c2ad1624283b6c7a62a28199f5161d388a738 (diff) | |
| download | linux-next-019560d23450a320f4060ff235563a5277ea8033.tar.gz linux-next-019560d23450a320f4060ff235563a5277ea8033.zip | |
cxl/port: Clear cached dport pointers when a dport is removed
Switch decoders cache dport pointers in cxlsd->target[], and nothing
clears them when a dport is freed. Readers then dereference freed memory.
KASAN caught it under a cxl_test load/unload loop with concurrent sysfs
reads (abbreviated).
Clear the matching slots from cxl_dport_remove(), walking the port's
decoders the way cxl_port_update_decoder_targets() does on the add side.
Scan all nr_targets slots, the target[] allocation size, and clear every
hit.
Fixes: 8330671c57c7 ("cxl: Add helper to delete dport")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20261001154744.1095902-2-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions
