diff options
| author | Zhu Ling <zhuling0805@qq.com> | 2026-09-05 00:20:58 +0800 |
|---|---|---|
| committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2026-11-24 09:38:35 +0100 |
| commit | 0bfb76b7c9274566cbcfe264e376dc18ad405059 (patch) | |
| tree | 197ce9504b759cc37bb5b10aad11239bc500b4f8 /tools/perf/scripts/python | |
| parent | 885147d1b42cfd2d55a93576fdfffd22aef9d4ed (diff) | |
can: netlink: fix IFLA_CAN_BITRATE_MAX attribute sizing
can_fill_info() emits IFLA_CAN_BITRATE_MAX with nla_put(), which consumes
space for both the attribute header and its aligned payload. However,
can_get_size() accounts for the payload only. The resulting underestimate
can make filling the netlink response fail with -EMSGSIZE when the skb has
no remaining slack.
Use nla_total_size() to account for the complete attribute.
Fixes: 2290aefa2e90 ("can: dev: Add support for limiting configured bitrate")
Cc: stable@vger.kernel.org
Signed-off-by: Zhu Ling <zhuling0805@qq.com>
Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/tencent_D1C873B86B0E92011A264B0E196B911D5308@qq.com
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/bug/linux-3924d490-baed-49dc-880a-6fd1163cf08d
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
