Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp759782imm; Fri, 1 Jun 2018 09:03:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLbBHUV1Ww1KKKJeXPcYDEE3KX3Tqf/HV+ItTpq1REHia5+yB8/bIFGqN6I2TTT2F3aJH7s X-Received: by 2002:a62:9056:: with SMTP id a83-v6mr11583635pfe.186.1527869030482; Fri, 01 Jun 2018 09:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527869030; cv=none; d=google.com; s=arc-20160816; b=BCbQyUHW2VTfBvMTofDGQtdqTyq6lbEK0xvG9NxFBGQ2PXdFF9apIiKP+u2iawjays 5jf12jYX0Apib3GAsg6JoWpMFtQ1fmAIE/FjC3nvy/N3yepR7Z8CMXLREhz2y6SXDs8u gJ9iOv7MoQR+N3lmOd6pryscR5v5tZbKwiJItJCvaQ8Ae0jKtAYbRBr0X2uBBJ84iTjG A4IvskEz8K9FxrnNLZUQoY8UWjmwHDksp2WlIFBWYfc+lANmDAOngwILaj/BH56k5yi0 hj6yaQ3L+p1d0a3n3idD4tCy5X+eTFHs6HDf2VH4Miug48d64T9LgUydllCBFJsmkTcu TRmA== 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=mHOiU1csBRzFVwcIvm7YBiHVS9kBxxsbrv6C/Cbzdb8=; b=Afgw/NYqT2YLDMjAdkk5xaN3dv5l0qrpWm11S1DYZ9CrST5LXJacTgmEejrhhCZPs+ igiQxDON1iMk40en2qTTI124m6/4x2X5Ed2vh7ccZ0/kfLriFm51BvlgseogtNWXTmPX oXApLC1Nf4+MQdVJiWeiZdbLCL6rsiAWZrDPM+Oil8Ej633fwVRrkUZB2d3L+VNI8bli zs4nGH8uV6+yyqO02CD4MPZYAUX8M7x3NQ19xhcSUxiR0ZjABxX2trKddwMKsf1VHPzX FbjN+ZqQHlGYPZ5djH4vtgck1SQt6RKI0M6fbQPigA5VKR+eOV2/8BCuEDQSQuZndgQO 9sLw== 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 x7-v6si3745472pfd.124.2018.06.01.09.03.21; Fri, 01 Jun 2018 09:03:50 -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 S1752961AbeFAQCL (ORCPT + 99 others); Fri, 1 Jun 2018 12:02:11 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:49006 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbeFAQCE (ORCPT ); Fri, 1 Jun 2018 12:02:04 -0400 Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Fri, 01 Jun 2018 10:01:53 -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, mhocko@kernel.org, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH -next v2 0/5] rhashtable: guarantee first allocation Date: Fri, 1 Jun 2018 09:01:20 -0700 Message-Id: <20180601160125.30031-1-dave@stgolabs.net> X-Mailer: git-send-email 2.16.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes from v1 lkml.kernel.org/r/20180524211135.27760-1-dave@stgolabs.net - patch 2 is reworked a bit based on the commments from Herbert Xu. o upon failure, retry immediately with GFP_NOFAIL (simpler) o the caller now passes the needed semantics, not bucket_table_alloc(). o we consider min_size when resizing, not just HASH_MIN_SIZE. - removed patch 3; not need after Michal's patch. 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 will update more callers, particularly those that use BUG_ON. patch 3+4 remove some ipc hacks we no longer need. patch 5 updates the rhashtable test module. Trivial. Please consider for v4.18. Thanks! [0] https://lkml.org/lkml/2018/5/23/758 Davidlohr Bueso (5): lib/rhashtable: convert param sanitations to WARN_ON lib/rhashtable: guarantee initial hashtable allocation 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/rhashtable.c | 22 ++++++++++++++-------- lib/test_rhashtable.c | 6 +----- 9 files changed, 53 insertions(+), 83 deletions(-) -- 2.16.3