Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp829137imm; Fri, 1 Jun 2018 10:12:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLri/3xLLfgLqN1Cv5l0MEX0jf0zvMe2yf56rsl25rb0WnZCdUZoMBEg4z1/Q3xR7vSX15h X-Received: by 2002:a17:902:d706:: with SMTP id w6-v6mr12049585ply.142.1527873137002; Fri, 01 Jun 2018 10:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527873136; cv=none; d=google.com; s=arc-20160816; b=J5SXgw5I1HZ/F8cemcTqIcU21RHS9h1QaxC+a0zY2ePIOkf6s9SWeEYnrI5l6qAPfG +GC622LXBzOgajpD9MejdUdfPpLKReIQBfFnNzdpnpDGh4WlQGSlCPw6K7HgoCqynPtZ xpUAYY2HGcRK9c6LVPKiGEaZ5V2KYiNlhOsPPZ5DKHsHaTZHX491jUu7aktJRb8vjnQ5 GCSyJQ8BD7QdN38+jBUvv8b9gvYRI2CgHQ2IaG4UUPr63xiTxwVxT7PR8dS53DK4ds7t Gcmkf85nsaGeNOS/LVAwYk8VYoUBszm9eBfGcGcSXv1uhA/9jGSgVHiUNxH2jyWb/W4U qQ2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UM7BxxvnwhWMtuFTZa2H08PeLyUC9t8CjwueqjP79W4=; b=sZcfY8+EaEg2rxSw/3XU/WaDZCBeR8EadA4FeTMEkADQUmc90CE7/GmHSot/almJzf j/KM3Fh99zB5u+37vszI+9o5R+72P+gPYZrUfQt8uQH7iftyUM9D/9O0XC3kv0c57Wup ZqXCdEsjWCTQNoa+HPwlzKdWWoC+HF0NYbxFgf8DjOEofbVxMWkdNzLQmepU9xNimAZr Zy9n37Xi+GXMSKELH8TjtebkWevtUmaP0Pbo3IPqi6iN25ik3VlTH9gsTQFUOsGPJWUg 9cgXtrJQII2zfMHJ+CF66pHht5tvX5fblXMy4w7XpkBj0rQx0MdSXqGLCkGd/ux2H8mc Le8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74-v6si4683703pfp.161.2018.06.01.10.12.02; Fri, 01 Jun 2018 10:12:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752776AbeFARKi (ORCPT + 99 others); Fri, 1 Jun 2018 13:10:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:48300 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbeFARKg (ORCPT ); Fri, 1 Jun 2018 13:10:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 74C38AC73; Fri, 1 Jun 2018 17:10:35 +0000 (UTC) Date: Fri, 1 Jun 2018 10:10:28 -0700 From: Davidlohr Bueso To: Herbert Xu Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, tgraf@suug.ch, manfred@colorfullife.com, mhocko@kernel.org, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 1/5] lib/rhashtable: convert param sanitations to WARN_ON Message-ID: <20180601171028.3rjlozqmuoofa3iy@linux-r8p5> References: <20180601160125.30031-1-dave@stgolabs.net> <20180601160125.30031-2-dave@stgolabs.net> <20180601160944.ji2gsp3pyunlj476@gondor.apana.org.au> <20180601165347.kvruerdm3gu57ifv@linux-r8p5> <20180601165903.bd3jonbv2jrfcevi@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180601165903.bd3jonbv2jrfcevi@gondor.apana.org.au> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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