summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorRichard Cheng <icheng@nvidia.com>2026-06-26 18:41:02 +0800
committerDave Jiang <dave.jiang@intel.com>2026-07-14 13:41:03 -0700
commit2aeb21fe557ef154f0cdf4f9745ebd8d5b31ca83 (patch)
tree0a13ceb85d1eb32d828c3b4d2787d13cbc886abe /tools/lib/python
parentcde18d6c1d913a67ab0afd3d9475ece4be79da50 (diff)
downloadlinux-2aeb21fe557ef154f0cdf4f9745ebd8d5b31ca83.tar.gz
linux-2aeb21fe557ef154f0cdf4f9745ebd8d5b31ca83.zip
cxl/features: Clamp Get Feature output size to the remaining buffer
cxl_get_feature() reads a feature in a loop but passes a fixed size_out as the output capacity every iteration. On the last partial iteration the buffer has less room left, so a device that returns more than asked can overflow feat_out. Use the per-iter size data_to_rd_size, which already tracks the remaining room, as the output capacity. Fixes: 5e5ac21f629d ("cxl/mbox: Add GET_FEATURE mailbox command") Signed-off-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260626104102.53892-4-icheng@nvidia.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions