Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26515619rwd; Mon, 3 Jul 2023 10:43:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbScBrBv4lxIKDE4xtuSfOamzJjOghQjOmW2k9mmzBjQuC/+JM0Lo8QdaDSTHZM3pGavJX X-Received: by 2002:a17:902:e551:b0:1b5:cbc:b4c with SMTP id n17-20020a170902e55100b001b50cbc0b4cmr14232145plf.46.1688406206724; Mon, 03 Jul 2023 10:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688406206; cv=none; d=google.com; s=arc-20160816; b=n9j1NVNLWWyR3bCgcXQbqZPBG8VUrKgPtaR9vzC0HnvCIXzGOD5U2jSroUY3RdcejC qx+mwtBs0htZLKar0axuPD/oNVWM61xcVMCKWbE77ACQP8hBoWCvvJ/HyGRT4LwObhTe 5Q+ez8asw3Q8NbGz5hFIv5DFhzPzLOP1HVb0QJnL4URjolDc05eSYJ+97GMZW37H6rOU aP7aZR/2Y7ZsfuAJjXeKBzddnifupX6xfTckL7gkaBpqkYoQ/QSlVIHz9zOyXpudakgc g2zVe0y8eJzX+j041XLznk9VGvuUNUiwRube+xAtWENK9XBMXkADtaHLjK/8fSbackPh T8Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=59RY6T31JaaeIn9zrIInlgxL+/dnCv3eY7rcIrGNlMc=; fh=JzlxYz35I9PVJVOb5lWicuEZuZtn39QwDVuqicdN2QY=; b=ZZZjMBn2WIRfwG5z1ekp8ZO//UcnjlaF6YJnJUZgam5H1UsvL5HqxdKXL9Ri5v6WzF 4whVNyCpoOT1fDvPLp95+ye+v/AzCgj4C4IEaRn4XIEYc9kDxJuu3Wb8VYoVWmX4SRYV jrBzTwNHlrd6WlLNeLlVKNEfC7BOwEiWxDDy8gEXEXSHaRUBqRK/g0ZLigT2dXzxNVxq irgxhdsmcdxkeFTVeHhGfKgTCz6oBJOSCUnoeS4Ae8a8g4vTtpSRHrvSiod+2kc7PW+S 4VS9//GJz5tL5FeTdP09iTkct9GAOTUPIY3pfpO+JUaNK1Q20NDfg+oVurOeEakX/i3H tFMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="MPn/1zc7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a170902e74400b001b8970a2b15si2722572plf.86.2023.07.03.10.43.11; Mon, 03 Jul 2023 10:43:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="MPn/1zc7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbjGCRHv (ORCPT + 99 others); Mon, 3 Jul 2023 13:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbjGCRHt (ORCPT ); Mon, 3 Jul 2023 13:07:49 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204B9E5D for ; Mon, 3 Jul 2023 10:07:48 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-98377c5d53eso548016866b.0 for ; Mon, 03 Jul 2023 10:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1688404066; x=1690996066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=59RY6T31JaaeIn9zrIInlgxL+/dnCv3eY7rcIrGNlMc=; b=MPn/1zc7TVZBMzUVi8vO6RbcGIWUoO+30fY2XSLb3KMon00ZY1vToCmexKBCJsk5Wb 43vQl28IXjwSv0N5PCN7JtD8KaiunsB6/bw9dlSZWCZ9c58w2rF0dhtROqfkAS/Vb0LA ZrnP+QGwY2OtVprX19udzdVRerCpJcm6IvWY4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688404066; x=1690996066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=59RY6T31JaaeIn9zrIInlgxL+/dnCv3eY7rcIrGNlMc=; b=I/rmnLU9YHSM3mK9phdIz64GWvFeyJtAjJLGCukPZ0gfaQK1V3THJQOkzoiqek87mD x0r6K6O/+Ha/ze4CW3HuPLU6fnhILTP6axOsIvQ3c7c+RYg7Z+B3tiNT4jbx2E0MzrZQ DSrZbjGdjyHk44H+Y4YPKKm5Yfp5cq8v3tilKS+qubrWnjfw5O8lp2D5giPFJ7/L6U6f lq3ohRDj9Trku7a2AGmtYwuRRwTKdURMr8u1hc1iLDAxQrSy6+8bV9J7gLcUNRkAL19T X7UBG//nQUMAyqIUvdRFXNOmpTkcn/Xc8OCM8Fyq5eHJ2NLIz5jUGw+wObaptoZEby+T w4dQ== X-Gm-Message-State: ABy/qLYz/aDgaXpW62OrP75s4hn65cnofcKus3I+EDAEsixvH2xbpVdf iVF2j6Bf/Hjvz5hwjkMPHq2TwhTGSf5cWSeztXkchobj X-Received: by 2002:a17:906:d9cf:b0:988:f2ad:73e9 with SMTP id qk15-20020a170906d9cf00b00988f2ad73e9mr7905988ejb.52.1688404066406; Mon, 03 Jul 2023 10:07:46 -0700 (PDT) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com. [209.85.208.52]) by smtp.gmail.com with ESMTPSA id r21-20020a1709067fd500b009828e26e519sm12015965ejs.122.2023.07.03.10.07.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jul 2023 10:07:45 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-51d9890f368so5223177a12.2 for ; Mon, 03 Jul 2023 10:07:45 -0700 (PDT) X-Received: by 2002:a05:6402:605:b0:51d:e975:bea8 with SMTP id n5-20020a056402060500b0051de975bea8mr7636407edv.13.1688404065516; Mon, 03 Jul 2023 10:07:45 -0700 (PDT) MIME-Version: 1.0 References: <20230703-dupe-frying-79ae2ccf94eb@spud> In-Reply-To: <20230703-dupe-frying-79ae2ccf94eb@spud> From: Linus Torvalds Date: Mon, 3 Jul 2023 10:07:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [mm] 408579cd62: WARNING:suspicious_RCU_usage To: Conor Dooley , Anup Patel , Palmer Dabbelt , Marc Zyngier Cc: lkp , "Liam R. Howlett" , LKML , lkp@lists.01.org, lkp@intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Jul 2023 at 10:00, Conor Dooley wrote: > > I'm not entirely sure if it is related, as stuff in the guts of mm like > this is beyond me, but I've been seeing similar warnings on RISC-V. No, that RISC-V warning is also about bad RCU usage, but that's a different thing. > RCU used illegally from offline CPU! > rcu_scheduler_active = 1, debug_locks = 1 > 1 lock held by swapper/1/0: > #0: ffffffff8169ceb0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x32 > > stack backtrace: > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.4.0-10173-ga901a3568fd2 #1 > Hardware name: riscv-virtio,qemu (DT) > Call Trace: > [] show_stack+0x2c/0x38 > [] dump_stack_lvl+0x5e/0x80 > [] dump_stack+0x14/0x1c > [] lockdep_rcu_suspicious+0x19e/0x232 > [] mtree_load+0x18a/0x3b6 > [] __irq_get_desc_lock+0x2c/0x82 > [] enable_percpu_irq+0x36/0x9e > [] riscv_ipi_enable+0x32/0x4e > [] smp_callin+0x24/0x66 This is also triggering on the maple tree sanity checks, but it' sa different maple tree, and a different code sequence. And a different case of suspicious RCU usage - not a lack of locking, but simply using RCU before marking the CPU online. I suspect the riscv_ipi_enable() in the RISC-V version of smp_callin() needs to be moved down to below the set_cpu_online(curr_cpuid, 1); or was there some reason why it needed to be done quite _that_ early in commit 832f15f42646 ("RISC-V: Treat IPIs as normal Linux IRQs")? Added guilty parties to the cc. Linus