diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a7497361e4d7..5c6241964637 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -152,6 +152,8 @@ static const struct rhashtable_params netlink_rhashtable_params; static inline u32 netlink_group_mask(u32 group) { + if (group > 32) + return 0; return group ? 1 << (group - 1) : 0; }