]> git.baikalelectronics.ru Git - kernel.git/commit
Partially revert "net/smc: Add netlink net namespace support"
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 2 Feb 2022 03:09:04 +0000 (06:09 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Feb 2022 15:42:41 +0000 (07:42 -0800)
commit120843bd5f27dd3448d35ce6b113498cd3375605
treed92a828eb3ccd8959349a1c75f7b0510d89443b8
parent0d729c143c3977377001a255be9c83925771d300
Partially revert "net/smc: Add netlink net namespace support"

The change of sizeof(struct smc_diag_linkinfo) by commit 2afa1378bbb5
("net/smc: Add netlink net namespace support") introduced an ABI
regression: since struct smc_diag_lgrinfo contains an object of
type "struct smc_diag_linkinfo", offset of all subsequent members
of struct smc_diag_lgrinfo was changed by that change.

As result, applications compiled with the old version
of struct smc_diag_linkinfo will receive garbage in
struct smc_diag_lgrinfo.role if the kernel implements
this new version of struct smc_diag_linkinfo.

Fix this regression by reverting the part of commit 2afa1378bbb5 that
changes struct smc_diag_linkinfo.  After all, there is SMC_GEN_NETLINK
interface which is good enough, so there is probably no need to touch
the smc_diag ABI in the first place.

Fixes: 2afa1378bbb5 ("net/smc: Add netlink net namespace support")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20220202030904.GA9742@altlinux.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/smc_diag.h
net/smc/smc_diag.c