Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2950114imm; Thu, 24 May 2018 19:43:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpXFbl0RDU2TkYWSUS9aZKnzL7C7wf7VPYg4VRuBZMxInGBX7HG/1KtlRgeQK9xGM1rVo2X X-Received: by 2002:aa7:82c7:: with SMTP id f7-v6mr592234pfn.218.1527216231202; Thu, 24 May 2018 19:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216231; cv=none; d=google.com; s=arc-20160816; b=PClHR3oPkIlzqwBPO4AdUyoa/4XxNk2DZVykfWn4UkB3e8gk/iIkdtwZiTeoVFh+rS 6646axAqBfalqXPG5cYDWRc8znLSTBAzA0tN3QB4Q9PXqp0jUpaCFwhKsCh2TIHhs9O9 +3vxsiPXjmHNz7KpNhXurcuY1WMDPi3QgxdNZ25Fjd0pNymFRbQf2BGE0G3rMlR+IzmK vShkwNi6Lupb42fl7FedKJZxHOQXjp2cEboJyouRecJyjDTN0HGE8jzEPB9GUOl4fo81 RO/9A+pcyXIdnXeNUwjMDZfC2UrgPCgm9xI28Py+h0z82dmLSCuZ9pSpjeHLj+Cm15U2 EddA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UIwUG/4ROU8Py0p+OSrSir34fnNJlgZyVvTb5YjEEBU=; b=AEN15WwfwnSaxFDAhPJBFekGcxcv0mYOtww+F88dakUox2qQCugMOtILifBlYCXFz4 84OCg+ts+rH3fjUpW655itPZ8sqz7AnAea4v6jKQ4lNbiWvliSjVHbWVmlonzMUathGh q7Mr2Fy89mFQbTXjnAg0gV1B4srbAn4qzvSUN3w8TNfNqHoz79ZKhgq2fOKcvGNq0J5v Or/yOb+e8bn0R1QcmMf7HWlSwSh3BrAgtQtK3xavggn7jk/QJydLQa74vZJx7o0SGEok fKA7sqSfxzy76A9oagI2X63MmmLWnrk91C0w9SpP8oYyLVKr8r/qYodKZ1Kkx7p5mh3j evBg== 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 s7-v6si17445617pgr.670.2018.05.24.19.43.36; Thu, 24 May 2018 19:43:51 -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 S1161318AbeEXV2R (ORCPT + 99 others); Thu, 24 May 2018 17:28:17 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:48521 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966782AbeEXV2Q (ORCPT ); Thu, 24 May 2018 17:28:16 -0400 Received: from linux-n805.suse.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Thu, 24 May 2018 15:28:08 -0600 From: Davidlohr Bueso To: akpm@linux-foundation.org, torvalds@linux-foundation.org Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, manfred@colorfullife.com, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH -next 0/6] rhashtable: guarantee first allocation Date: Thu, 24 May 2018 14:11:29 -0700 Message-Id: <20180524211135.27760-1-dave@stgolabs.net> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series is the result of the discussion with Linus around ipc subsystem initialization and how it behaves with error return when calling rhashtable_init()[1]. Instead of caring about the error or calling the infamous BUG_ON, Linus suggested we guarantee the rhashtable allocation. First two patches modify rhashtable_init() to just return 0, future patches I guess can update more callers. patch 3 is a nit I found while reading the code and just makes use kvmalloc_array(). patch 4+5 remove some ipc hacks we no longer need. patch 6 updates the rhashtable test module. Trivial. Please consider for v4.18. Thanks! [0] https://lkml.org/lkml/2018/5/23/758 Davidlohr Bueso (6): lib/rhashtable: convert param sanitations to WARN_ON lib/rhashtable: guarantee initial hashtable allocation lib/bucket_locks: use kvmalloc_array() ipc: get rid of ids->tables_initialized hack ipc: simplify ipc initialization lib/test_rhashtable: rhashtable_init() can no longer fail include/linux/ipc_namespace.h | 1 - ipc/msg.c | 9 ++++---- ipc/namespace.c | 20 ++++-------------- ipc/sem.c | 10 ++++----- ipc/shm.c | 9 ++++---- ipc/util.c | 41 ++++++++++++------------------------ ipc/util.h | 18 ++++++++-------- lib/bucket_locks.c | 2 +- lib/rhashtable.c | 49 ++++++++++++++++++++++++++++++++++--------- lib/test_rhashtable.c | 6 +----- 10 files changed, 79 insertions(+), 86 deletions(-) -- 2.13.6