diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-13 05:22:03 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-13 05:22:03 (GMT) |
commit | ce78c76f33b9f43b92444869d1723f9e4260797a (patch) | |
tree | 0abcedcc0e5eed5db44abb687876f12132254d40 | |
parent | 415b6f19e87e350b13585591859d4fdf50772229 (diff) | |
parent | ccdf6ce6a8dba374668ae9b4d763e19903611c38 (diff) | |
download | linux-ce78c76f33b9f43b92444869d1723f9e4260797a.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
-rw-r--r-- | net/netlink/genetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 8e63662..d3f6b06 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); |