[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160113075330.GD26987@fi-ourus-dhcp00977.emea.nsn-net.net>
Date: Wed, 13 Jan 2016 09:53:30 +0200
From: Matti Vaittinen <matti.vaittinen@...ia.com>
To: EXT David Miller <davem@...emloft.net>
Cc: johannes.berg@...el.com, jbenc@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, alexander.sverdlin@...ia.com,
teppo.o.pennanen@...ia.com
Subject: Re: [PATCH 1/1] net: netlink: Fix multicast group storage allocation
for families with more than one groups
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 <matti.vaittinen@...ia.com>
> > - 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
Powered by blists - more mailing lists