Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1243756ybl; Thu, 22 Aug 2019 11:30:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNEm7u6Eyz+PhRt1EIEhnG0uSYijN3wTDm1WEOYApJPJzkV6ZM15jvjW7BR3LC2S5E0a4e X-Received: by 2002:a63:1908:: with SMTP id z8mr456335pgl.433.1566498629691; Thu, 22 Aug 2019 11:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566498629; cv=none; d=google.com; s=arc-20160816; b=erayRqAklln5P9NdZC3iwvEXj/eijKFUfMCuJS6GJ9Z0REwLHw8jzIS3WzTS6gIFEG q3DfT6vOdbg2IYzwTJ6IZNk1a9w2eSIUI2OU/C2PteBeGD8BrD45Qp6sN5nyRtsQXG4v PjuFI9fY4Y+PH4hnIbPg15CpckHuQtV+5WStorZTFTSFBjQCCzYe2n6Zf9tHfsBLq7b9 EfME24NOH3fFsBzaDg4JkykBwT/KgIr2Ha/8m9zcvy/Lg6yUl7dz8kqPRy6x2aVRR78B OAv/hxFjRC5Jckj7m7EdJu9lKauEwnsexNqxvp0SRzYsXfPzwFC3bL3F437L0m/ViqwN ERSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=xg1bo4K5uOKosHr38A2yINFYaUxoShxYMjS5oTZmXcY=; b=m40NUBT/LhR9xptpkArQur6G5sU+F46+18qrepyv7cOuyMfS0NMunGIVv3dhToBxR4 GgfmmX0oSh2NRp9YV0Vs60Ba8DRsul1qGlmOr9tnEVETpFNDyuoCZA8JSrt+tUyyVEeO BBeujWT7/ztkf2OXvz5MVUHOPCz1EaMMjGB2ZgIpmH1cTXpwRvHyOUu/mHpHtjzhKDlX GY4+qIVia4lcY3gNLoFCvFdD4SJ5W1L5wyIBqbu4frnx6KCs3Jz3YYpVYkGrvNLGTl3D A4/Hs5fvW3wenQgEwgDmIBykbtarJOcBZV1xkMsQlyuvpwEaIwVu4nivisdlZVVFsHRf jLhA== 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 h11si49822pgr.555.2019.08.22.11.30.14; Thu, 22 Aug 2019 11:30:29 -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 S2388888AbfHVNIz (ORCPT + 99 others); Thu, 22 Aug 2019 09:08:55 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:60963 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731794AbfHVNIy (ORCPT ); Thu, 22 Aug 2019 09:08:54 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 46DlGX5qJ5z9sNk; Thu, 22 Aug 2019 23:08:52 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: c784be435d5dae28d3b03db31753dd7a18733f0c In-Reply-To: <1557906352-29048-1-git-send-email-ego@linux.vnet.ibm.com> To: "Gautham R. Shenoy" , Paul Mackerras , Nicholas Piggin , "Aneesh Kumar K.V" From: Michael Ellerman Cc: "Gautham R. Shenoy" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt() Message-Id: <46DlGX5qJ5z9sNk@ozlabs.org> Date: Thu, 22 Aug 2019 23:08:52 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-05-15 at 07:45:52 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The calls to arch_add_memory()/arch_remove_memory() are always made > with the read-side cpu_hotplug_lock acquired via > memory_hotplug_begin(). On pSeries, > arch_add_memory()/arch_remove_memory() eventually call resize_hpt() > which in turn calls stop_machine() which acquires the read-side > cpu_hotplug_lock again, thereby resulting in the recursive acquisition > of this lock. ... > > Fix this issue by > 1) Requiring all the calls to pseries_lpar_resize_hpt() be made > with cpu_hotplug_lock held. > > 2) In pseries_lpar_resize_hpt() invoke stop_machine_cpuslocked() > as a consequence of 1) > > 3) To satisfy 1), in hpt_order_set(), call mmu_hash_ops.resize_hpt() > with cpu_hotplug_lock held. > > Reported-by: Aneesh Kumar K.V > Signed-off-by: Gautham R. Shenoy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c784be435d5dae28d3b03db31753dd7a18733f0c cheers