]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
devlink: fix port new reply cmd type
authorJiri Pirko <jiri@nvidia.com>
Mon, 18 Mar 2024 09:19:08 +0000 (10:19 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:11 +0000 (18:20 -0400)
commit7d8c7bc99a3307342e0281dd7df1d717dd5e0ed1
tree089e594c27fde33039ad860f334f9c7109c8cf89
parent3a9f78b297e08ca8e88ae3ecff1f6fe2766dc5eb
devlink: fix port new reply cmd type

[ Upstream commit 78a2f5e6c15d8dcbd6495bb9635c7cb89235dfc5 ]

Due to a c&p error, port new reply fills-up cmd with wrong value,
any other existing port command replies and notifications.

Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW.

Skimmed through devlink userspace implementations, none of them cares
about this cmd value.

Reported-by: Chenyuan Yang <chenyuan0y@gmail.com>
Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/
Fixes: cd76dcd68d96 ("devlink: Support add and delete devlink port")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://lore.kernel.org/r/20240318091908.2736542-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/devlink/port.c