Skip to content
Commit 0f25725d authored by Felix Maurer's avatar Felix Maurer Committed by Sasha Levin
Browse files

hsr: Handle failures in module init

[ Upstream commit 3cf28cd4 ]

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: f421436a

 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: default avatarFelix Maurer <fmaurer@redhat.com>
Reviewed-by: default avatarShigeru Yoshida <syoshida@redhat.com>
Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/3ce097c15e3f7ace98fc7fd9bcbf299f092e63d1.1710504184.git.fmaurer@redhat.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4a4dffdf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment