Thread (3 messages) flat view 3 messages, 2 authors, 2016-01-13

Re: [PATCH 1/1] net: netlink: Fix multicast group storage allocation for families with more than one groups

From: Matti Vaittinen <hidden>
Date: 2016-01-13 06:48:18
Also in: lkml

Hello David & others,

On Tue, Jan 12, 2016 at 04:42:11PM -0500, EXT David Miller wrote:
But I think your change has an off-by-one bug:

From: Matti Vaittinen <redacted>
quoted
-		if (id >= mc_groups_longs * BITS_PER_LONG) {
+		if (id + n_groups >= mc_groups_longs * BITS_PER_LONG) {
I think this needs to be "id + n_groups > ".  Consider the existing,
working, case of "n_groups == 1".  Now you're adding '1' and therefore
the test needs to be adjusted from >= to >.
Absolutely. I did patch v2.

Br.
    Matti Vaittinen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help