Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp3079141lqz; Wed, 3 Apr 2024 18:50:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9GAAsSF6Kodc3tqLw0X9GTqZFZsAJW7d7b5Hd1RLadR+u8Iw6gXlRrepZ6Mw4223saiv01BmEhUrYV982vHxQOdfj92ZB3LMQN3isAQ== X-Google-Smtp-Source: AGHT+IHHE+NNQUpegQRrZISy5f+jnJlRPUzHI9yoQBrywNtHukwmHFtWn6Sf+cS1xaSHJ/dKutua X-Received: by 2002:a05:6a20:3254:b0:1a7:2db0:baa6 with SMTP id hm20-20020a056a20325400b001a72db0baa6mr1173739pzc.30.1712195439625; Wed, 03 Apr 2024 18:50:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712195439; cv=pass; d=google.com; s=arc-20160816; b=p9Y4pSz5g++a2yrOw14wQceFduvPH+XQtwvFBK/dIoVyib4Olm77PkPGcqxuV5vfqf yaN08w4Vnut/GctyPy836NsdBFF/UyU6q5U7OifBNh7KUqDcq0RkOYT8/zS8th0RdA/8 KeLWf1oc4kgTsLT/t9Rbn3gdIKSSuSE623QSQ3cDRRPZCC3kjEcjOASILpBwOcui34eI Rt0GCU++k9naZ9cfTH+eoVFHNIuzydtvS11wziTbMOyeoNI/39EqtV633NvKukiq2aeG JuZkIeTcv1yPU2Nk1ZD0K0AAGekdFQt87cfo1SHGoOf7QajphC8/OsS2022o9xlZ6O3w CBYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=ajUW4ylOGIFEIeG8SHu/nTNx3urwXydqsfKVO9g/Z6s=; fh=k+khNLBWEKhMOaN5x6WJT7tVyPgBxJGGPlc2PS6qZN0=; b=Gbr9bbLUOpO+SHEdaYTHBygfKFazvg/XYwRKedCfmjHVSmntq80j1ZQht8xrc+ioaY gmoRKK25xnma7mTLCE1CcLOrvolWIt2xaucL0wQcYsuRMhCn+1f+ECRukggUAZ+f5g6r twYwN6QWnjdThgxhHGisRH8n09djiIv1oRi+v94TuswKmoEP2myomVoQeZo7qSgntCvl /3RHLpHUJACeaKN7BIG7geaTE52fr9BOy4XS9giIfsPBQM5AvGroaySJEd0MncFTXUu+ /h6VJVCItZecgr4SmncAwh2tm6aOzWJaioLALD6WMk+xegIoBVMczVVEpiL86mvXMHx+ RL7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qb1JzlHC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q16-20020a170902eb9000b001ddda950756si4849116plg.99.2024.04.03.18.50.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 18:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qb1JzlHC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AC184B233C0 for ; Thu, 4 Apr 2024 01:34:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81C4A10A2A; Thu, 4 Apr 2024 01:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qb1JzlHC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8532414285; Thu, 4 Apr 2024 01:34:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712194455; cv=none; b=PH0a30A2BP3UeUxqqbbHn6XKGs9Qe9QcC294hECFJaFQP8RZKcBTL444TfQrhyC10vmyr/3LF+8zqKhV4vEz/k84hsM7vUdz1g3krF27/jlmqhr8Be0NQnfbSScHB3w7UsaytZz/NST6GoI7S9FFs/0PmQK7biFjaf7pgJi4jnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712194455; c=relaxed/simple; bh=PLHX9CmuF+jzJhTft7r/1Y8OPKACX4mI6u4er178G2M=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kSymGw5ScfNgpXpy52rMtSiloUPRCHA5eJIHweEs9DSg5cnsmBOsotOjwrimS7dTw+pTckMMkFH6xLHT8fNTGh1lGtk8JmtHIhJtTdW+MtXHWGx5AhQe2TfBOTTO0ReN1f0FG4FIK/kgq+9KSTMR0r7e4kvlIZLBVeyDIHp3bqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qb1JzlHC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A94D4C433C7; Thu, 4 Apr 2024 01:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712194455; bh=PLHX9CmuF+jzJhTft7r/1Y8OPKACX4mI6u4er178G2M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qb1JzlHCkOQ0xQR9xEkxKvsw8OA1eBs2sTlr4JQ5PzuUXWpA08puhxOS0+HGL5xJt p+tSFhHdI0/W38jVkWUzbZ83SoA9Ze3oVX0I/xz35tzw9J8ehO4Ej2Z+v4WDgVFly6 bK1uHAbfHAa/MKwQyDRnXJvZKbn2ZQDjArtD+Ho/3cPayZMvc1juvsoNzlmJRr/Ju4 IiompHkE91W7nulKLmrSnjlpjrH1dYJE6//xltRqVI5kAJhGo2sMI29VSfrrA1CwJ3 2VTX8Ds9j7vLv82qYyQgrRRjYVgNl7GVkee7GY7YJqfjkE9sRb6rgoQPF1hbD/SIKA JnLshHl50ZGTA== Date: Wed, 3 Apr 2024 18:34:12 -0700 From: Jakub Kicinski To: Guenter Roeck Cc: linux-kselftest@vger.kernel.org, David Airlie , Arnd Bergmann , =?UTF-8?B?TWHDrXJh?= Canal , Dan Carpenter , Kees Cook , Daniel Diaz , David Gow , Arthur Grillo , Brendan Higgins , Naresh Kamboju , Maarten Lankhorst , Andrew Morton , Maxime Ripard , Ville =?UTF-8?B?U3lyasOkbMOk?= , Daniel Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, x86@kernel.org, Linux Kernel Functional Testing , Eric Dumazet Subject: Re: [PATCH v3 06/15] net: kunit: Suppress lock warning noise at end of dev_addr_lists tests Message-ID: <20240403183412.16254318@kernel.org> In-Reply-To: <20240403131936.787234-7-linux@roeck-us.net> References: <20240403131936.787234-1-linux@roeck-us.net> <20240403131936.787234-7-linux@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 3 Apr 2024 06:19:27 -0700 Guenter Roeck wrote: > dev_addr_lists_test generates lock warning noise at the end of tests > if lock debugging is enabled. There are two sets of warnings. > > WARNING: CPU: 0 PID: 689 at kernel/locking/mutex.c:923 __mutex_unlock_slowpath.constprop.0+0x13c/0x368 > DEBUG_LOCKS_WARN_ON(__owner_task(owner) != __get_current()) > > WARNING: kunit_try_catch/1336 still has locks held! > > KUnit test cleanup is not guaranteed to run in the same thread as the test > itself. For this test, this means that rtnl_lock() and rtnl_unlock() may > be called from different threads. This triggers the warnings. > Suppress the warnings because they are irrelevant for the test and just > confusing and distracting. > > The first warning can be suppressed by using START_SUPPRESSED_WARNING() > and END_SUPPRESSED_WARNING() around the call to rtnl_unlock(). To suppress > the second warning, it is necessary to set debug_locks_silent while the > rtnl lock is held. Is it okay if I move the locking into the tests, instead? It's only 4 lines more and no magic required, seems to work fine.