OpenCloudOS-Kernel/net/devlink
Vasiliy Kovalev 919092bd54 devlink: fix possible use-after-free and memory leaks in devlink_init()
[ Upstream commit def689fc26b9a9622d2e2cb0c4933dd3b1c8071c ]

The pernet operations structure for the subsystem must be registered
before registering the generic netlink family.

Make an unregister in case of unsuccessful registration.

Fixes: 687125b579 ("devlink: split out core code")
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
Link: https://lore.kernel.org/r/20240215203400.29976-1-kovalev@altlinux.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:35:07 +01:00
..
Makefile devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
core.c devlink: fix possible use-after-free and memory leaks in devlink_init() 2024-03-01 13:35:07 +01:00
dev.c devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
devl_internal.h devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
dpipe.c devlink: push dpipe related code into separate file 2023-08-28 08:02:22 -07:00
health.c devlink: Hold devlink lock on health reporter dump get 2023-10-06 15:56:46 -07:00
linecard.c devlink: push linecard related code into separate file 2023-08-28 08:02:23 -07:00
netlink.c devlink: move small_ops definition into netlink.c 2023-08-28 08:02:23 -07:00
netlink_gen.c netlink: specs: devlink: extend health reporter dump attributes by port index 2023-08-14 11:47:25 -07:00
netlink_gen.h netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00
param.c devlink: push param related code into separate file 2023-08-28 08:02:22 -07:00
port.c devlink: Fix referring to hw_addr attribute during state validation 2024-02-05 20:14:36 +00:00
rate.c devlink: push rate related code into separate file 2023-08-28 08:02:23 -07:00
region.c devlink: push region related code into separate file 2023-08-28 08:02:23 -07:00
resource.c devlink: push resource related code into separate file 2023-08-28 08:02:22 -07:00
sb.c devlink: push shared buffer related code into separate file 2023-08-28 08:02:22 -07:00
trap.c devlink: push trap related code into separate file 2023-08-28 08:02:23 -07:00