Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1192519imm; Wed, 23 May 2018 11:48:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo5Hdk5kchqyxJqG6/R6Qpgnjj+7SXwnEo46rVQ1y5K8l4CYYTf0m4gEzntoAJUWJDAjmFM X-Received: by 2002:a62:845:: with SMTP id c66-v6mr3988169pfd.189.1527101280014; Wed, 23 May 2018 11:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527101279; cv=none; d=google.com; s=arc-20160816; b=gYPTB4Lj74l1dwZecQR9e+LeWB5EtTd7KeB4rSBYI6ypuKSJ8pYx2nWvZquyShhVjP eRzSCyx+2KFLYZ6kviU+sksh73OCNRBbFjgzP5F6P65RMLqvLYO7Taumq7Fwc8rdg5BY CY6dJdZ729zGfTsFbhLZhPUVAcdnmCQvvUyuy+YcIunE7QO878nWO/I2aZjIXvIw9RPx N/AV228H5IEGNJnK3yyg/EknTA+ijgiedr9NK1GbkCrIyyeq5+PsB+A1VcZ4RlI+YnvJ TOednUobltakQJ6vR8B60guLhbngMqGoxgUQtEgVt9B1jD6lTl8wIwkxdj5+ZS+Rhb4W CYzw== 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=Gas7N7/SuR4h4/NQWRxKSAeUSYOe9mEFkE0k0rkbKD4=; b=fAZuQhxpjPNDn0+WJeE+ka+zjdp4qBVsIG5K70UIJh6XS6phRaP4hdG31GfY/l4AOi BgiwjsDgVKKG7UMwSjgsipZzeeuaKRWxHB6ucs5UCn74Y6Aq5lF4gutlhaDMba+6Y10F vbjnd7npGg4IqqhaNVmFgxPIJnu+RE3759a+/kQc1SYTWjmrJNoYcnFVRuy2FZne37ze 2GTS4mlNxFvKeW2vOekYmQhfW1/esZjENnFn3RCNzC+8gP8VwOr79x+UI6o93BaDhQQe 6ex/JK4zhFgeEa8dw47vtdjd3bvIT/CMU+q8pv+VstdQivK/bz2yLT88SwjgLNzYgSic RwHA== 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 f8-v6si13543450pgn.567.2018.05.23.11.47.45; Wed, 23 May 2018 11:47:59 -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 S934123AbeEWSrh (ORCPT + 99 others); Wed, 23 May 2018 14:47:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:56283 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933926AbeEWSrg (ORCPT ); Wed, 23 May 2018 14:47:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D2C3AADC4; Wed, 23 May 2018 18:47:34 +0000 (UTC) Date: Wed, 23 May 2018 11:31:03 -0700 From: Davidlohr Bueso To: Linus Torvalds Cc: Thomas Graf , Herbert Xu , Andrew Morton , Manfred Spraul , guillaume.knispel@supersonicimagine.com, Linux API , Linux Kernel Mailing List Subject: Re: semantics of rhashtable and sysvipc Message-ID: <20180523183103.cdgv4slom62y56wi@linux-n805> References: <20180523172500.anfvmjtumww65ief@linux-n805> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 May 2018, Linus Torvalds wrote: >So I'm perfectly fine with getting rid of 'tables_initialized'. But no, not >with a BUG_ON(). > >If you cannot guarantee that the allocation works (using __GFP_NOFAIL is >ok, for example - but it only works with small allocations), then you need >to handle the allocation failure. Note that even if the allocation was guaranteed, there are still param validations and rhashtable_init() can return -EINVAL.