summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorXu Rao <raoxu@uniontech.com>2026-06-03 17:59:57 +0800
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-06-04 06:58:59 +0200
commit503c5ae1e72aa9ed91925dafa3d82ee2e992747f (patch)
tree7e689e5c81999795b6a5d1a2e02bcfe38c68356e /scripts
parent168479c9bf07ee28c372c48eebbf66f2d01911dd (diff)
thunderbolt: debugfs: Fix margining error counter buffer leak
When USB4 lane margining debugfs write support is enabled, margining_error_counter_write() copies the user input with validate_and_copy_from_user(). This allocates a temporary page that is only needed while parsing the requested error counter mode. The function currently returns without freeing that page. This leaks one page per write to the error_counter debugfs file, including successful writes and writes that later fail while taking the domain lock or because software margining is not enabled. Free the temporary page once parsing has completed, and also before returning from the invalid-input path. Fixes: 10904df3f20c ("thunderbolt: Improve software receiver lane margining") Signed-off-by: Xu Rao <raoxu@uniontech.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions