aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-13 00:22:03 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-13 00:22:03 -0500
commitce78c76f33b9f43b92444869d1723f9e4260797a (patch)
tree0abcedcc0e5eed5db44abb687876f12132254d40 /net
parentnet: bnxt: always return values from _bnxt_get_max_rings (diff)
parentnet: netlink: Fix multicast group storage allocation for families with more than one groups (diff)
downloadwireguard-linux-ce78c76f33b9f43b92444869d1723f9e4260797a.tar.xz
wireguard-linux-ce78c76f33b9f43b92444869d1723f9e4260797a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net')
-rw-r--r--net/netlink/genetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 8e63662c6fb0..d3f6b063467b 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -185,7 +185,7 @@ static int genl_allocate_reserve_groups(int n_groups, int *first_id)
}
}
- if (id >= mc_groups_longs * BITS_PER_LONG) {
+ if (id + n_groups >= mc_groups_longs * BITS_PER_LONG) {
unsigned long new_longs = mc_groups_longs +
BITS_TO_LONGS(n_groups);
size_t nlen = new_longs * sizeof(unsigned long);