summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorFernando Fernandez Mancera <fmancera@suse.de>2026-10-28 23:53:50 +0100
committerJakub Kicinski <kuba@kernel.org>2026-10-30 16:25:14 -0700
commit162cf592b577cccf04515100563e819d9eba5c4a (patch)
treee34d2fbe4f38641ae762f866eb2f914592f3cf73 /rust/kernel/alloc/kvec/errors.rs
parent7b29287b182fc50518e9e65c41f86d24a05b7205 (diff)
net/smc: fix limit_smc_hs sysctl on big-endian architecture
net->smc.limit_smc_hs is a bool, but its sysctl entry uses proc_dointvec_minmax() with .maxlen = sizeof(int), so the handler accesses four bytes at the address of a one-byte field. On little-endian this works with the extra bytes being written in struct padding. On big-endian (tested on s390x) the bool sits at the most significant byte of the int therefore the bool stays false and the "1" goes into padding. The sysctl reads back 1 but SMC sockets created afterwards see limit_smc_hs as disabled. Fix this by using proc_dobool() handler and adjust the maxlen to the right value. Fixes: f8406a2fd279 ("net/smc: add sysctl for smc_limit_hs") Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Link: https://patch.msgid.link/20261028225350.3753-1-fmancera@suse.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions