summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2024-10-08 11:47:35 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-17 15:22:23 +0200
commitd66c612c40041886919cb0cbf1e82322ea70b3e1 (patch)
treeff45b47265f2b29f836c912c5cffb28b72a4c360 /include/net
parent438c8d7dfdcbec9476e448bfd903971db1580d83 (diff)
downloadlinux-d66c612c40041886919cb0cbf1e82322ea70b3e1.tar.gz
linux-d66c612c40041886919cb0cbf1e82322ea70b3e1.tar.bz2
linux-d66c612c40041886919cb0cbf1e82322ea70b3e1.zip
mctp: Handle error of rtnl_register_module().
[ Upstream commit d51705614f668254cc5def7490df76f9680b4659 ] Since introduced, mctp has been ignoring the returned value of rtnl_register_module(), which could fail silently. Handling the error allows users to view a module as an all-or-nothing thing in terms of the rtnetlink functionality. This prevents syzkaller from reporting spurious errors from its tests, where OOM often occurs and module is automatically loaded. Let's handle the errors by rtnl_register_many(). Fixes: 583be982d934 ("mctp: Add device handling and netlink interface") Fixes: 831119f88781 ("mctp: Add neighbour netlink interface") Fixes: 06d2f4c583a7 ("mctp: Add netlink route management") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mctp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/mctp.h b/include/net/mctp.h
index 7ed84054f462..afeda2ad22d6 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -293,7 +293,7 @@ void mctp_neigh_remove_dev(struct mctp_dev *mdev);
int mctp_routes_init(void);
void mctp_routes_exit(void);
-void mctp_device_init(void);
+int mctp_device_init(void);
void mctp_device_exit(void);
#endif /* __NET_MCTP_H */