|
@@ -265,7 +265,7 @@ static inline int genlmsg_multicast_netns(struct genl_family *family,
|
|
struct net *net, struct sk_buff *skb,
|
|
struct net *net, struct sk_buff *skb,
|
|
u32 portid, unsigned int group, gfp_t flags)
|
|
u32 portid, unsigned int group, gfp_t flags)
|
|
{
|
|
{
|
|
- if (group >= family->n_mcgrps)
|
|
|
|
|
|
+ if (WARN_ON_ONCE(group >= family->n_mcgrps))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
group = family->mcgrp_offset + group;
|
|
group = family->mcgrp_offset + group;
|
|
return nlmsg_multicast(net->genl_sock, skb, portid, group, flags);
|
|
return nlmsg_multicast(net->genl_sock, skb, portid, group, flags);
|
|
@@ -283,9 +283,6 @@ static inline int genlmsg_multicast(struct genl_family *family,
|
|
struct sk_buff *skb, u32 portid,
|
|
struct sk_buff *skb, u32 portid,
|
|
unsigned int group, gfp_t flags)
|
|
unsigned int group, gfp_t flags)
|
|
{
|
|
{
|
|
- if (group >= family->n_mcgrps)
|
|
|
|
- return -EINVAL;
|
|
|
|
- group = family->mcgrp_offset + group;
|
|
|
|
return genlmsg_multicast_netns(family, &init_net, skb,
|
|
return genlmsg_multicast_netns(family, &init_net, skb,
|
|
portid, group, flags);
|
|
portid, group, flags);
|
|
}
|
|
}
|