Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2683498imj; Mon, 11 Feb 2019 07:00:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IbgeSQwtjY+6rJI2vw7DYEKaGXP5u6k/Ut/bjkxbXR34C579+dVaPyY0vVkl9bQzDUlnTQp X-Received: by 2002:a17:902:28aa:: with SMTP id f39mr38031977plb.297.1549897223063; Mon, 11 Feb 2019 07:00:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897223; cv=none; d=google.com; s=arc-20160816; b=ZwY08hAKf/PPcN6tyWqFsUfF1Zie/pZQ9bSHQR7fiVJVRElVx3G5lHr4Zl62A2HvY4 7ileuhRtSYOD0hvy5bI6K6JEiITrCj3LFGPsLU6luqPFt4Oem2AJt6nLcUXr8tDpDYP/ NcOJCd4oGTdDyagWm+iCWfZ5gYe7miSA6jC305zpstmdccjZNrnD4jKWuVgJAnhw6Zvo BCBxxKwHjev1igtdZjdIGOAgrRtPtsd/9Ob9SHfmx/X0tQAg/cHHcH5HO4uu3DoKxLgx gbyDUH1gog++4izfbF2K0UT+ttVj8Lw+ASFkG09f9QmmoRTaa5t81e4v78w6rMFP/vjJ NjZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sqN12RBYtNPjxtspDszSmOXEydxGhhKCOYlXcApUZ+o=; b=hePar9HdNlclb83R5T32K3UnEvlU5lzJgGEYvpukhVEBG2WD3CPHMYg9mMVlKFn7V5 b5tN6hEc5/k+qv4UymqfdpyJZZZaQxZbx7Rw8tkNhj/CwpNjqBm0lHbz2GiEzChbIhGg piVT2xNeTIdill1rnbFjVoV+4H5lj3r+4xjd/U/5LmeAD1u38ahB2MAqQzHZoAvqQP1Q PUsW17+kzWu56UktcMnU9PfQa2dtX8/jYjV7JHJMHlEcLIAIw5jeWjdWtwhDzdrnfNp/ 6AIXYdbGvBQrkQ8orCaO5+T6SDuYRrgYqtjNCF/YgvEemegXyE9/kUf8/20q+sBuegHL mWRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c2M2+CoV; 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 f63si9498603pgc.473.2019.02.11.07.00.06; Mon, 11 Feb 2019 07:00:23 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=c2M2+CoV; 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 S2389750AbfBKO7N (ORCPT + 99 others); Mon, 11 Feb 2019 09:59:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:46928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389742AbfBKO7L (ORCPT ); Mon, 11 Feb 2019 09:59:11 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DD5B206BA; Mon, 11 Feb 2019 14:59:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897150; bh=hAHYgthFgwlKnjZ47dHjGAhNAtWoXcnO9ByIoZhV+bc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c2M2+CoVDGH5z0A/SpkWKWFM/L+25HOzzTATFnZJUCK2hmvW+BzFAV5kJqdFv2ZjA Ewm9Bg0F/4bCen9N2nhpOfrf1hZ+u6r3ZiLPhKdlw1+QpZ8dcKvGPSX0apHCSQw/JB AvAuIIP0QbkZ4ZDM+EVe/yExjn2mGQWGnSdDXBbw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tejun Heo , Dennis Zhou , Sasha Levin , Michael Cree Subject: [PATCH 4.14 107/205] percpu: convert spin_lock_irq to spin_lock_irqsave. Date: Mon, 11 Feb 2019 15:18:25 +0100 Message-Id: <20190211141835.549390951@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 6ab7d47bcbf0144a8cb81536c2cead4cde18acfe ] >From Michael Cree: "Bisection lead to commit b38d08f3181c ("percpu: restructure locking") as being the cause of lockups at initial boot on the kernel built for generic Alpha. On a suggestion by Tejun Heo that: So, the only thing I can think of is that it's calling spin_unlock_irq() while irq handling isn't set up yet. Can you please try the followings? 1. Convert all spin_[un]lock_irq() to spin_lock_irqsave/unlock_irqrestore()." Fixes: b38d08f3181c ("percpu: restructure locking") Reported-and-tested-by: Michael Cree Acked-by: Tejun Heo Signed-off-by: Dennis Zhou Signed-off-by: Sasha Levin --- mm/percpu-km.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/percpu-km.c b/mm/percpu-km.c index 0d88d7bd5706..c22d959105b6 100644 --- a/mm/percpu-km.c +++ b/mm/percpu-km.c @@ -50,6 +50,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; struct pcpu_chunk *chunk; struct page *pages; + unsigned long flags; int i; chunk = pcpu_alloc_chunk(gfp); @@ -68,9 +69,9 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) chunk->data = pages; chunk->base_addr = page_address(pages) - pcpu_group_offsets[0]; - spin_lock_irq(&pcpu_lock); + spin_lock_irqsave(&pcpu_lock, flags); pcpu_chunk_populated(chunk, 0, nr_pages, false); - spin_unlock_irq(&pcpu_lock); + spin_unlock_irqrestore(&pcpu_lock, flags); pcpu_stats_chunk_alloc(); trace_percpu_create_chunk(chunk->base_addr); -- 2.19.1