Message ID | 20221015130548.3634468-1-guoren@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp634278wrs; Sat, 15 Oct 2022 06:10:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70Nx+jCLHmDB4ylUCSaqNkgMGUDctulZq6S7UQ+8YNjV43LXZ3JBTVVF9ubGqZ4JAzdekp X-Received: by 2002:a17:902:a60c:b0:184:fa22:8b3c with SMTP id u12-20020a170902a60c00b00184fa228b3cmr2599669plq.136.1665839416268; Sat, 15 Oct 2022 06:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665839416; cv=none; d=google.com; s=arc-20160816; b=Kd6pGfbyKK+2RiMKCAU+RRB3uMdw1o9NvOFVpXvK7wwhSq0YA5e22erCK8PdMBy+18 LEfyjLXaov30LTA22LCjvWVK33ZzoDgo0VqQEmXQChAgYmySk4ivghJZ2hHTKT8s9Mz4 n1RQdUqmLLNWW+jef2+gYzNS85Wzx1Qr4nLt90xqNGTy7bdtGDMudFWmP6BbwDp7n2N3 HOOoeTZ4mjWzSo7IxAFVNkVJDuF/OXGnXNQvxHKr5osimzDeeQuFhIls63anY66kC8wC m2Y8t6/TWsj9iKMEfIrJhvFVohNfkhwTABVoGMqybM6pTGNHxTeQzfT2JIIawxOnRiGI F8Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9Pg4hvWFieD6UEPu46bO4otyb6lgtTQmNPuSjAQbfN0=; b=ZXjIg1sm2n8Dd72RQS5bTKmouEhBgIZsV09EWZ6xIxOVKjiJUcoBfA9vxU7U3/NKDh E3AErNDs2zahIJHd5V62Nd6TCrQzug5nCJ04gc7u8CVFpz0UOFLWBoIr8oB2p9o19Ccb a9vZpbooOUzn7V7PUh7vcM7qAXsrynaYmz/fdI97w9zlYulvPwlfXmJtwxtlkvO7iFUg vIwQFENmQdJEfwol8W+HfsF13xm5+wehBcOg7ANoUTG67pI9O+vYFsaVzpulUrLnqPi7 TeYVzXHOzS+L1fVk4+gHKKG2jl9VWhmr18tTxCZ7kzm7RWgn6GjD6GIkLYUzHJk0D1G9 F3uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HffXtRlh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a635217000000b0042b85da3a53si5782012pgb.473.2022.10.15.06.10.03; Sat, 15 Oct 2022 06:10:16 -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=@kernel.org header.s=k20201202 header.b=HffXtRlh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiJONGY (ORCPT <rfc822;rhyswoolcott@gmail.com> + 99 others); Sat, 15 Oct 2022 09:06:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiJONGW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 15 Oct 2022 09:06:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 976AD41D22; Sat, 15 Oct 2022 06:06:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2C77260D2D; Sat, 15 Oct 2022 13:06:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1618EC433D6; Sat, 15 Oct 2022 13:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665839180; bh=Ji/vrbmpLGWke/L0oUj7MVZ9WkCpinOLZYa5hj5TGxk=; h=From:To:Cc:Subject:Date:From; b=HffXtRlhVNxupMmrL3DzDgSKRHYGZ4vSrLsfz3KvFL/qIQwELcoBH++qGB/rkfVk9 S3VTQkIJwj3qwJy3MCAy6bag0PCiXxYWCSS8dgaPuIin7zHnVJIWKl5tVrsgUx++Ew uiK/mjTFk4Z/4q88Qu4kzRGfhddyqpX6hIKWPFRGk/ztgOEhrCpwrzoYI2cxfZrJ+6 M3fNzKJ8pwNhXuMe/Cq9FFn/OSwkfvcD8HdWMETQh2nhOLza8n3MDc2ygHDbc7iREU DNFg2MX1qa9pyO6B06hTt59czXGQxe+9DC3qPD6d37XuzPRdkuQgPybKidNvLXaDIe mpaIeVmnjdFWw== From: guoren@kernel.org To: andriy.shevchenko@linux.intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux@rasmusvillemoes.dk, yury.norov@gmail.com, caraitto@google.com, willemb@google.com, jonolson@google.com, amritha.nambiar@intel.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org> Subject: [PATCH] Revert "cpumask: fix checking valid cpu range" Date: Sat, 15 Oct 2022 09:05:48 -0400 Message-Id: <20221015130548.3634468-1-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746759231634707959?= X-GMAIL-MSGID: =?utf-8?q?1746759231634707959?= |
Series |
Revert "cpumask: fix checking valid cpu range"
|
|
Commit Message
Guo Ren
Oct. 15, 2022, 1:05 p.m. UTC
From: Guo Ren <guoren@linux.alibaba.com> This reverts commit 78e5a3399421ad79fc024e6d78e2deb7809d26af. ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 cpumask_next_wrap+0x5c/0x80 Let's back this out and retry with a larger clean up in -next. Fixes: 78e5a3399421 ("cpumask: fix checking valid cpu range") Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Cc: Jakub Kicinski <kuba@kernel.org> --- include/linux/cpumask.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
Comments
On Sat, Oct 15, 2022 at 09:05:48AM -0400, guoren@kernel.org wrote: > From: Guo Ren <guoren@linux.alibaba.com> > > This reverts commit 78e5a3399421ad79fc024e6d78e2deb7809d26af. > > ------------[ cut here ]------------ > WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 cpumask_next_wrap+0x5c/0x80 > > Let's back this out and retry with a larger clean up in -next. > Unfortunately the revert triggers (or exposes ?) another backtrace. WARNING: CPU: 0 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x194/0x976 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.0.0-12199-g277163563de8 #1 Hardware name: riscv-virtio,qemu (DT) epc : __netif_set_xps_queue+0x194/0x976 ra : __netif_set_xps_queue+0x3b0/0x976 epc : c089a664 ra : c089a880 sp : c2515c60 gp : c1d8e760 tp : c2578040 t0 : c364f980 t1 : 00000000 t2 : 00001fff s0 : c2515cd0 s1 : c2515ce4 a0 : c364f940 a1 : 00000000 a2 : c364f940 a3 : 00000000 a4 : c364f950 a5 : c364f890 a6 : 00000003 a7 : 00000000 s2 : 00000001 s3 : c1d382c0 s4 : 00000000 s5 : 00000000 s6 : 00000000 s7 : c364f880 s8 : 00000000 s9 : 00000001 s10: 00000001 s11: 00000000 t3 : 00000018 t4 : 7fd38a0e t5 : 00000007 t6 : c3639470 status: 00000120 badaddr: 00000000 cause: 00000003 [<c074548a>] virtnet_set_affinity+0x13a/0x1a2 [<c07478de>] virtnet_probe+0x884/0xfdc [<c063ce9a>] virtio_dev_probe+0x1d6/0x354 [<c0683d6e>] really_probe+0x82/0x214 [<c0683f58>] __driver_probe_device+0x58/0xa2 [<c0683fd2>] driver_probe_device+0x30/0xaa [<c0684596>] __driver_attach+0x56/0x11c [<c0681f26>] bus_for_each_dev+0x52/0x90 [<c06837c0>] driver_attach+0x1a/0x22 [<c068331a>] bus_add_driver+0x148/0x1b6 [<c0684d70>] driver_register+0x52/0xea [<c063c924>] register_virtio_driver+0x1a/0x28 [<c0c2428e>] virtio_net_driver_init+0x7a/0xa6 [<c0002824>] do_one_initcall+0x5e/0x2e2 [<c0c01130>] kernel_init_freeable+0x298/0x306 [<c0aa0ac2>] kernel_init+0x1e/0x10e [<c0003ad8>] ret_from_exception+0x0/0x10 irq event stamp: 106012 hardirqs last enabled at (106011): [<c0aa9284>] _raw_spin_unlock_irqrestore+0x54/0x62 hardirqs last disabled at (106012): [<c0007534>] __trace_hardirqs_off+0xc/0x14 softirqs last enabled at (105764): [<c0886392>] napi_get_frags_check+0x0/0x50 softirqs last disabled at (105758): [<c0886392>] napi_get_frags_check+0x0/0x50 This is the result of commit 854701ba4c39 ("net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}"). Guenter
On Sun, Oct 16, 2022 at 12:50 AM Guenter Roeck <linux@roeck-us.net> wrote: > > On Sat, Oct 15, 2022 at 09:05:48AM -0400, guoren@kernel.org wrote: > > From: Guo Ren <guoren@linux.alibaba.com> > > > > This reverts commit 78e5a3399421ad79fc024e6d78e2deb7809d26af. > > > > ------------[ cut here ]------------ > > WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 cpumask_next_wrap+0x5c/0x80 > > > > Let's back this out and retry with a larger clean up in -next. > > > > Unfortunately the revert triggers (or exposes ?) another backtrace. This should be fixed by another Revert patch. https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 Please have a try. > > WARNING: CPU: 0 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x194/0x976 > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.0.0-12199-g277163563de8 #1 > Hardware name: riscv-virtio,qemu (DT) > epc : __netif_set_xps_queue+0x194/0x976 > ra : __netif_set_xps_queue+0x3b0/0x976 > epc : c089a664 ra : c089a880 sp : c2515c60 > gp : c1d8e760 tp : c2578040 t0 : c364f980 > t1 : 00000000 t2 : 00001fff s0 : c2515cd0 > s1 : c2515ce4 a0 : c364f940 a1 : 00000000 > a2 : c364f940 a3 : 00000000 a4 : c364f950 > a5 : c364f890 a6 : 00000003 a7 : 00000000 > s2 : 00000001 s3 : c1d382c0 s4 : 00000000 > s5 : 00000000 s6 : 00000000 s7 : c364f880 > s8 : 00000000 s9 : 00000001 s10: 00000001 > s11: 00000000 t3 : 00000018 t4 : 7fd38a0e > t5 : 00000007 t6 : c3639470 > status: 00000120 badaddr: 00000000 cause: 00000003 > [<c074548a>] virtnet_set_affinity+0x13a/0x1a2 > [<c07478de>] virtnet_probe+0x884/0xfdc > [<c063ce9a>] virtio_dev_probe+0x1d6/0x354 > [<c0683d6e>] really_probe+0x82/0x214 > [<c0683f58>] __driver_probe_device+0x58/0xa2 > [<c0683fd2>] driver_probe_device+0x30/0xaa > [<c0684596>] __driver_attach+0x56/0x11c > [<c0681f26>] bus_for_each_dev+0x52/0x90 > [<c06837c0>] driver_attach+0x1a/0x22 > [<c068331a>] bus_add_driver+0x148/0x1b6 > [<c0684d70>] driver_register+0x52/0xea > [<c063c924>] register_virtio_driver+0x1a/0x28 > [<c0c2428e>] virtio_net_driver_init+0x7a/0xa6 > [<c0002824>] do_one_initcall+0x5e/0x2e2 > [<c0c01130>] kernel_init_freeable+0x298/0x306 > [<c0aa0ac2>] kernel_init+0x1e/0x10e > [<c0003ad8>] ret_from_exception+0x0/0x10 > irq event stamp: 106012 > hardirqs last enabled at (106011): [<c0aa9284>] _raw_spin_unlock_irqrestore+0x54/0x62 > hardirqs last disabled at (106012): [<c0007534>] __trace_hardirqs_off+0xc/0x14 > softirqs last enabled at (105764): [<c0886392>] napi_get_frags_check+0x0/0x50 > softirqs last disabled at (105758): [<c0886392>] napi_get_frags_check+0x0/0x50 > > This is the result of commit 854701ba4c39 ("net: fix cpu_max_bits_warn() > usage in netif_attrmask_next{,_and}"). > > Guenter
On 10/15/22 19:58, Guo Ren wrote: > On Sun, Oct 16, 2022 at 12:50 AM Guenter Roeck <linux@roeck-us.net> wrote: >> >> On Sat, Oct 15, 2022 at 09:05:48AM -0400, guoren@kernel.org wrote: >>> From: Guo Ren <guoren@linux.alibaba.com> >>> >>> This reverts commit 78e5a3399421ad79fc024e6d78e2deb7809d26af. >>> >>> ------------[ cut here ]------------ >>> WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 cpumask_next_wrap+0x5c/0x80 >>> >>> Let's back this out and retry with a larger clean up in -next. >>> >> >> Unfortunately the revert triggers (or exposes ?) another backtrace. > This should be fixed by another Revert patch. > > https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 > > Please have a try. > Yes, I already tested that one and confirmed that it fixes the warning below. Thanks for the pointer. Guenter >> >> WARNING: CPU: 0 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x194/0x976 >> Modules linked in: >> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.0.0-12199-g277163563de8 #1 >> Hardware name: riscv-virtio,qemu (DT) >> epc : __netif_set_xps_queue+0x194/0x976 >> ra : __netif_set_xps_queue+0x3b0/0x976 >> epc : c089a664 ra : c089a880 sp : c2515c60 >> gp : c1d8e760 tp : c2578040 t0 : c364f980 >> t1 : 00000000 t2 : 00001fff s0 : c2515cd0 >> s1 : c2515ce4 a0 : c364f940 a1 : 00000000 >> a2 : c364f940 a3 : 00000000 a4 : c364f950 >> a5 : c364f890 a6 : 00000003 a7 : 00000000 >> s2 : 00000001 s3 : c1d382c0 s4 : 00000000 >> s5 : 00000000 s6 : 00000000 s7 : c364f880 >> s8 : 00000000 s9 : 00000001 s10: 00000001 >> s11: 00000000 t3 : 00000018 t4 : 7fd38a0e >> t5 : 00000007 t6 : c3639470 >> status: 00000120 badaddr: 00000000 cause: 00000003 >> [<c074548a>] virtnet_set_affinity+0x13a/0x1a2 >> [<c07478de>] virtnet_probe+0x884/0xfdc >> [<c063ce9a>] virtio_dev_probe+0x1d6/0x354 >> [<c0683d6e>] really_probe+0x82/0x214 >> [<c0683f58>] __driver_probe_device+0x58/0xa2 >> [<c0683fd2>] driver_probe_device+0x30/0xaa >> [<c0684596>] __driver_attach+0x56/0x11c >> [<c0681f26>] bus_for_each_dev+0x52/0x90 >> [<c06837c0>] driver_attach+0x1a/0x22 >> [<c068331a>] bus_add_driver+0x148/0x1b6 >> [<c0684d70>] driver_register+0x52/0xea >> [<c063c924>] register_virtio_driver+0x1a/0x28 >> [<c0c2428e>] virtio_net_driver_init+0x7a/0xa6 >> [<c0002824>] do_one_initcall+0x5e/0x2e2 >> [<c0c01130>] kernel_init_freeable+0x298/0x306 >> [<c0aa0ac2>] kernel_init+0x1e/0x10e >> [<c0003ad8>] ret_from_exception+0x0/0x10 >> irq event stamp: 106012 >> hardirqs last enabled at (106011): [<c0aa9284>] _raw_spin_unlock_irqrestore+0x54/0x62 >> hardirqs last disabled at (106012): [<c0007534>] __trace_hardirqs_off+0xc/0x14 >> softirqs last enabled at (105764): [<c0886392>] napi_get_frags_check+0x0/0x50 >> softirqs last disabled at (105758): [<c0886392>] napi_get_frags_check+0x0/0x50 >> >> This is the result of commit 854701ba4c39 ("net: fix cpu_max_bits_warn() >> usage in netif_attrmask_next{,_and}"). >> >> Guenter > > >
Ping Jakub Kicinski <kuba@kernel.org>. You seem to miss this Revert fixup on cpumask_check(n + 1). Your patch has merged in v6.1-rc1, but that is not enough. https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 Without the patch, there still is a warning. On Sun, Oct 16, 2022 at 11:49 AM Guenter Roeck <linux@roeck-us.net> wrote: > > On 10/15/22 19:58, Guo Ren wrote: > > On Sun, Oct 16, 2022 at 12:50 AM Guenter Roeck <linux@roeck-us.net> wrote: > >> > >> On Sat, Oct 15, 2022 at 09:05:48AM -0400, guoren@kernel.org wrote: > >>> From: Guo Ren <guoren@linux.alibaba.com> > >>> > >>> This reverts commit 78e5a3399421ad79fc024e6d78e2deb7809d26af. > >>> > >>> ------------[ cut here ]------------ > >>> WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 cpumask_next_wrap+0x5c/0x80 > >>> > >>> Let's back this out and retry with a larger clean up in -next. > >>> > >> > >> Unfortunately the revert triggers (or exposes ?) another backtrace. > > This should be fixed by another Revert patch. > > > > https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 > > > > Please have a try. > > > > Yes, I already tested that one and confirmed that it fixes the warning below. > Thanks for the pointer. > > Guenter > > >> > >> WARNING: CPU: 0 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x194/0x976 > >> Modules linked in: > >> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.0.0-12199-g277163563de8 #1 > >> Hardware name: riscv-virtio,qemu (DT) > >> epc : __netif_set_xps_queue+0x194/0x976 > >> ra : __netif_set_xps_queue+0x3b0/0x976 > >> epc : c089a664 ra : c089a880 sp : c2515c60 > >> gp : c1d8e760 tp : c2578040 t0 : c364f980 > >> t1 : 00000000 t2 : 00001fff s0 : c2515cd0 > >> s1 : c2515ce4 a0 : c364f940 a1 : 00000000 > >> a2 : c364f940 a3 : 00000000 a4 : c364f950 > >> a5 : c364f890 a6 : 00000003 a7 : 00000000 > >> s2 : 00000001 s3 : c1d382c0 s4 : 00000000 > >> s5 : 00000000 s6 : 00000000 s7 : c364f880 > >> s8 : 00000000 s9 : 00000001 s10: 00000001 > >> s11: 00000000 t3 : 00000018 t4 : 7fd38a0e > >> t5 : 00000007 t6 : c3639470 > >> status: 00000120 badaddr: 00000000 cause: 00000003 > >> [<c074548a>] virtnet_set_affinity+0x13a/0x1a2 > >> [<c07478de>] virtnet_probe+0x884/0xfdc > >> [<c063ce9a>] virtio_dev_probe+0x1d6/0x354 > >> [<c0683d6e>] really_probe+0x82/0x214 > >> [<c0683f58>] __driver_probe_device+0x58/0xa2 > >> [<c0683fd2>] driver_probe_device+0x30/0xaa > >> [<c0684596>] __driver_attach+0x56/0x11c > >> [<c0681f26>] bus_for_each_dev+0x52/0x90 > >> [<c06837c0>] driver_attach+0x1a/0x22 > >> [<c068331a>] bus_add_driver+0x148/0x1b6 > >> [<c0684d70>] driver_register+0x52/0xea > >> [<c063c924>] register_virtio_driver+0x1a/0x28 > >> [<c0c2428e>] virtio_net_driver_init+0x7a/0xa6 > >> [<c0002824>] do_one_initcall+0x5e/0x2e2 > >> [<c0c01130>] kernel_init_freeable+0x298/0x306 > >> [<c0aa0ac2>] kernel_init+0x1e/0x10e > >> [<c0003ad8>] ret_from_exception+0x0/0x10 > >> irq event stamp: 106012 > >> hardirqs last enabled at (106011): [<c0aa9284>] _raw_spin_unlock_irqrestore+0x54/0x62 > >> hardirqs last disabled at (106012): [<c0007534>] __trace_hardirqs_off+0xc/0x14 > >> softirqs last enabled at (105764): [<c0886392>] napi_get_frags_check+0x0/0x50 > >> softirqs last disabled at (105758): [<c0886392>] napi_get_frags_check+0x0/0x50 > >> > >> This is the result of commit 854701ba4c39 ("net: fix cpu_max_bits_warn() > >> usage in netif_attrmask_next{,_and}"). > >> > >> Guenter > > > > > > > -- Best Regards Guo Ren
On Mon, 17 Oct 2022 10:56:05 +0800 Guo Ren wrote: > Ping Jakub Kicinski <kuba@kernel.org>. > > You seem to miss this Revert fixup on cpumask_check(n + 1). > > Your patch has merged in v6.1-rc1, but that is not enough. > https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 > > Without the patch, there still is a warning. Sorry, I don't know what you mean. I was only putting a workaround back into the core networking code - I'm guessing this patch will silence the warning that comes from virtio? I haven't looked into that one.
On Tue, Oct 18, 2022 at 3:53 AM Jakub Kicinski <kuba@kernel.org> wrote: > > On Mon, 17 Oct 2022 10:56:05 +0800 Guo Ren wrote: > > Ping Jakub Kicinski <kuba@kernel.org>. > > > > You seem to miss this Revert fixup on cpumask_check(n + 1). > > > > Your patch has merged in v6.1-rc1, but that is not enough. > > https://lore.kernel.org/netdev/166582921612.1299.769135677399153914.git-patchwork-notify@kernel.org/T/#m0111a76380626b2f91e072ecdd5827578d5cbf60 > > > > Without the patch, there still is a warning. > > Sorry, I don't know what you mean. I was only putting a workaround back > into the core networking code - I'm guessing this patch will silence > the warning that comes from virtio? I haven't looked into that one. Without the patch, Linux-v6.1-rc1 would warn when CONFIG_DEBUG_PER_CPU_MAPS was enabled. [ 2.130438] virtio_blk virtio0: 1/0/0 default/read/poll queues [ 2.137585] virtio_blk virtio0: [vda] 122880 512-byte logical blocks (62.9 MB/60.0 MiB) [ 2.196181] lkdtm: No crash points registered, enable through debugfs [ 2.246658] ------------[ cut here ]------------ [ 2.247468] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:110 __netif_set_xps_queue+0x14e/0x792 [ 2.248738] Modules linked in: [ 2.249323] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc1 #336 [ 2.250038] Hardware name: riscv-virtio,qemu (DT) [ 2.250697] epc : __netif_set_xps_queue+0x14e/0x792 [ 2.251538] ra : __netif_set_xps_queue+0x56c/0x792 [ 2.252029] epc : ffffffff806f2972 ra : ffffffff806f2d90 sp : ff600000023279d0 [ 2.252664] gp : ffffffff81603d88 tp : ff600000023a0000 t0 : ff60000003068a40 [ 2.253270] t1 : 0000000000000003 t2 : 0000000000000000 s0 : ff60000002327a90 [ 2.253878] s1 : 0000000000000000 a0 : ff60000003068a00 a1 : ff60000003068a00 [ 2.254491] a2 : ff600000030687e8 a3 : 0000000000000004 a4 : 0000000000000000 [ 2.255521] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 [ 2.256506] s2 : 0000000000000000 s3 : 0000000000000000 s4 : ff60000002327aa0 [ 2.257161] s5 : ffffffff816071c0 s6 : 0000000000000000 s7 : 0000000000000001 [ 2.257761] s8 : 0000000000000000 s9 : 0000000000000004 s10: ff600000030687c0 [ 2.258369] s11: 0000000000000004 t3 : 0000000000000000 t4 : 0000000000000014 [ 2.259368] t5 : 0000000000000000 t6 : 0000000000000000 [ 2.260270] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003 [ 2.261200] [<ffffffff805d941e>] virtnet_set_affinity+0x14a/0x1c0 [ 2.261837] [<ffffffff805db734>] virtnet_probe+0x832/0xf1e [ 2.262319] [<ffffffff804ff5d0>] virtio_dev_probe+0x164/0x2de [ 2.263055] [<ffffffff8054d478>] really_probe+0x82/0x224 [ 2.263858] [<ffffffff8054d674>] __driver_probe_device+0x5a/0xaa [ 2.264445] [<ffffffff8054d6f0>] driver_probe_device+0x2c/0xb8 [ 2.264987] [<ffffffff8054dd1a>] __driver_attach+0x76/0x108 [ 2.265495] [<ffffffff8054b436>] bus_for_each_dev+0x52/0x9a [ 2.265996] [<ffffffff8054ce40>] driver_attach+0x1a/0x28 [ 2.266475] [<ffffffff8054c94a>] bus_add_driver+0x154/0x1c2 [ 2.267383] [<ffffffff8054e546>] driver_register+0x52/0x108 [ 2.268198] [<ffffffff804ff0d4>] register_virtio_driver+0x1c/0x2c [ 2.268778] [<ffffffff80a291a0>] virtio_net_driver_init+0x7a/0xb0 [ 2.269323] [<ffffffff80002854>] do_one_initcall+0x66/0x2e4 [ 2.269834] [<ffffffff80a01226>] kernel_init_freeable+0x28a/0x304 [ 2.270372] [<ffffffff808cc8b6>] kernel_init+0x1e/0x110 [ 2.271099] [<ffffffff80003d42>] ret_from_exception+0x0/0x10 [ 2.272015] ---[ end trace 0000000000000000 ]---
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 2f065ad97541..c2aa0aa26b45 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -174,8 +174,9 @@ static inline unsigned int cpumask_last(const struct cpumask *srcp) static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) { - /* n is a prior cpu */ - cpumask_check(n + 1); + /* -1 is a legal arg here. */ + if (n != -1) + cpumask_check(n); return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n + 1); } @@ -188,8 +189,9 @@ unsigned int cpumask_next(int n, const struct cpumask *srcp) */ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) { - /* n is a prior cpu */ - cpumask_check(n + 1); + /* -1 is a legal arg here. */ + if (n != -1) + cpumask_check(n); return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); } @@ -229,8 +231,9 @@ static inline unsigned int cpumask_next_and(int n, const struct cpumask *src1p, const struct cpumask *src2p) { - /* n is a prior cpu */ - cpumask_check(n + 1); + /* -1 is a legal arg here. */ + if (n != -1) + cpumask_check(n); return find_next_and_bit(cpumask_bits(src1p), cpumask_bits(src2p), nr_cpumask_bits, n + 1); } @@ -260,8 +263,8 @@ static inline unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap) { cpumask_check(start); - /* n is a prior cpu */ - cpumask_check(n + 1); + if (n != -1) + cpumask_check(n); /* * Return the first available CPU when wrapping, or when starting before cpu0,