[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180601171028.3rjlozqmuoofa3iy@linux-r8p5>
Date: Fri, 1 Jun 2018 10:10:28 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
tgraf@...g.ch, manfred@...orfullife.com, mhocko@...nel.org,
guillaume.knispel@...ersonicimagine.com, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/5] lib/rhashtable: convert param sanitations to WARN_ON
On Sat, 02 Jun 2018, Herbert Xu wrote:
>On Fri, Jun 01, 2018 at 09:53:47AM -0700, Davidlohr Bueso wrote:
>>
>> Curious, are these users setting up the param structure dynamically
>> or something that they can pass along bogus values?
>>
>> If that's the case then yes, I definitely agree.
>
>It's just a quality of implementation issue. This is a generic API.
>Sure for early-boot users like yours it makes sense to just WARN_ON
>rather than deal with the messy hash table allocation failure.
>
>But for a driver author writing some kernel module it isn't nice
>to WARN_ON and then crash on a NULL-pointer dereference when we
>can cleanly fail the table init.
Fine, at least patch 2 applies without this one. So Andrew, if you
consider taking this series please drop patch 1 and 5 (which no
longer makes sense as rhashtable_init() won't be returning void
in the future).
If you want me to resend (assuming other issues are not pointed out),
I can do but I wanted to avoid spamming more the necessary.
Thanks,
Davidlohr
Powered by blists - more mailing lists