summaryrefslogtreecommitdiff
path: root/tools/testing/vma/include/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2026-04-03 10:24:51 +0800
committerJakub Kicinski <kuba@kernel.org>2026-04-06 18:06:47 -0700
commitf32ba0963119b2520127077d72ebe7f6f8cb847f (patch)
treec6ac025242162155846730e7da6a0186e3c45a07 /tools/testing/vma/include/git@git.tavy.me:linux.git
parent70e32aadb5cab9ef706962e1293582ec03f89625 (diff)
net: mctp: defer creation of dst after source-address check
Sashiko reports: > mctp_dst_from_route() increments the device reference count by calling > mctp_dev_hold(). When a valid route is found and dst is NULL, the > structure copy is bypassed and rc is set to 0. Instead of optimistically creating a dst from the final route (then releasing it if the saddr is invalid), perform the saddr check first. This means we don't have an unuecessary hold/release on the dev, which could leak if the dst pointer is NULL. No caller passes a NULL dst at present though (so the leak is not possible), but this is an intended use of mctp_dst_from_route(). Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260403-dev-mctp-dst-defer-v1-1-9c2c55faf9e9@codeconstruct.com.au Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions