kernel_samsung_a53x/net/hsr
Felix Maurer 0ba27f2ba4 hsr: Handle failures in module init
[ Upstream commit 3cf28cd492308e5f63ed00b29ea03ca016264376 ]

A failure during registration of the netdev notifier was not handled at
all. A failure during netlink initialization did not unregister the netdev
notifier.

Handle failures of netdev notifier registration and netlink initialization.
Both functions should only return negative values on failure and thereby
lead to the hsr module not being loaded.

Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: Felix Maurer <fmaurer@redhat.com>
Reviewed-by: Shigeru Yoshida <syoshida@redhat.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/3ce097c15e3f7ace98fc7fd9bcbf299f092e63d1.1710504184.git.fmaurer@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 08:44:59 +01:00
..
hsr_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_device.c net: hsr: remove WARN_ONCE() in send_hsr_supervision_frame() 2024-11-18 12:13:30 +01:00
hsr_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_forward.c hsr: Prevent use after free in prp_create_tagged_frame() 2024-11-18 11:43:07 +01:00
hsr_forward.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_framereg.c hsr: Fix uninit-value access in hsr_get_node() 2024-11-19 08:44:59 +01:00
hsr_framereg.h hsr: Avoid double remove of a node. 2024-11-18 22:25:35 +01:00
hsr_main.c hsr: Handle failures in module init 2024-11-19 08:44:59 +01:00
hsr_main.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_netlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_netlink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_slave.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hsr_slave.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00