[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567113CA.8030108@canonical.com>
Date: Wed, 16 Dec 2015 02:33:30 -0500
From: William Hua <william.hua@...onical.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: netdev@...r.kernel.org, tgraf@...g.ch
Subject: Re: [PATCH] rhashtable: Always allocate at least one bucket lock
On 12/16/2015 12:53 AM, Herbert Xu wrote:
> William Hua <william.hua@...onical.com> wrote:
>> No bucket locks are allocated when an rhashtable is initialized with
>> fewer than two elements. In this special case, we should allocate at
>> least one to prevent a segfault.
>>
>> Signed-off-by: William Hua <william.hua@...onical.com>
>
> Huh? The minimum hash table size is 4. How are you getting an
> rhashtable that's smaller than the required minimum?
I wasn't aware there was an enforced minimum size. I simply set the
nelem_hint in the rhastable_params struct to 1, expecting it to grow as
needed. This caused a segfault afterwards when trying to insert an
element.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists