From patchwork Thu Nov 7 11:13:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13866216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3A18D43349 for ; Thu, 7 Nov 2024 11:18:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5AFED6B009F; Thu, 7 Nov 2024 06:18:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 510A46B00A3; Thu, 7 Nov 2024 06:18:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FBFE6B009F; Thu, 7 Nov 2024 06:18:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EE5696B00A1 for ; Thu, 7 Nov 2024 06:18:28 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A6B7BC062F for ; Thu, 7 Nov 2024 11:18:28 +0000 (UTC) X-FDA: 82759050360.28.97E6C55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf26.hostedemail.com (Postfix) with ESMTP id 2865D140016 for ; Thu, 7 Nov 2024 11:17:58 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=RcCsSVC6; dkim=pass header.d=linutronix.de header.s=2020e header.b=SyZa2FZ+; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf26.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730978247; a=rsa-sha256; cv=none; b=A/Yn5M+d2bi/ZaUOPMasHIFlYWmJ1MUGv1VwG0O7+lWcE+LVu3O7jpu+V7CL/SfV7A87Rq hIaK5N6yAqT/bgCjVqqViQQT2ihBKqQB5olrLGWkypYwWRNFJh0yPRGmu/gdSsoEfU+679 8wfQklE7/4hCgHtNtT5WOUBcXd+4P/A= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=RcCsSVC6; dkim=pass header.d=linutronix.de header.s=2020e header.b=SyZa2FZ+; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf26.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730978247; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=NjLLP55ROdVW0XOMGkfmixpDUwgnQl08mDjZ5Jht+U0=; b=k51KZPt/usnhKq164uuJCiDfBf0e8TMxfjETVELMdz7/6vIlin7ErWP6zieg0NILtL2hPi 8SEHmxj8yO97kcwlfY3sOpTF0woMDLKSGtZ0xbLahK2d+bPveucpV6m6uejeLV6CxP72S6 AMLmoL2xl6D4jIbUBWNVdw/WiBtJCww= From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730978303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjLLP55ROdVW0XOMGkfmixpDUwgnQl08mDjZ5Jht+U0=; b=RcCsSVC6nNwFokH3h2eTKUiRQ/fq1s8Cn9QwSC/V8l/INU9WUG3IEXNxVa+TTnYrqtSreP smdyCf+iydEWNUK8eXmi7Xj4M6A4N+bu9Y/6Kgin3hAqFIxAhoFzIdFzXIlLZhkIjN4Sg9 9d//DNoib7nNo2uTbY3Myo2mOUpSg5lvSWE2ahwkAYsFXtbofRaeVHBLSGXhlUW+RsGxZG DIUi9b8MsZ3QYSnymfnDJCjh8W5FewCIIdnBaXr3hDRLOnMfORpZ2ZgYIwBZRYFPbcC4cJ 2oQP3iOi1EjKQsCKjFgVj2OXSJhka17yhAtRy/rLjt/yE5WXAUNwULeBr0M6uw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730978303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjLLP55ROdVW0XOMGkfmixpDUwgnQl08mDjZ5Jht+U0=; b=SyZa2FZ+gclMtdRfvg0vE1IDog3dHu7z1eeMlPxR5jjArJZLNsNho4d0smiLBfbfNQO2jT 82z9vrV1y6eCvwCw== To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "Paul E. McKenney" , Boqun Feng , Marco Elver , Peter Zijlstra , Tomas Gleixner , Vlastimil Babka , akpm@linux-foundation.org, cl@linux.com, iamjoonsoo.kim@lge.com, longman@redhat.com, penberg@kernel.org, rientjes@google.com, sfr@canb.auug.org.au Subject: [PATCH v2 0/3] scftorture: Avoid kfree from IRQ context. Date: Thu, 7 Nov 2024 12:13:05 +0100 Message-ID: <20241107111821.3417762-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 2865D140016 X-Rspamd-Server: rspam01 X-Stat-Signature: 5iq3syz36crqawjqrkbwoa3cixtmxpij X-HE-Tag: 1730978278-937661 X-HE-Meta: U2FsdGVkX1/JFRmQJIfaethpOEkVHqZvEkffcSFuYCrLhK3+JFYdMqfs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3qbQ7hx38aAr2Y7cZHhhOY96UlasLcBQ2KtDT59F7ilkBTRCCdsKycbczMZ5evYVmURr4EXlcSnTMTWwlwJE6seVHyzlFm5 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, Paul reported kfree from IRQ context in scftorture which is noticed by lockdep since the recent PROVE_RAW_LOCK_NESTING switch. The last patch in this series adresses the issues, the other things happened on the way. v1…v2: - Remove kfree_bulk(). I get more invocations per report without it. - Pass `cpu' to scf_cleanup_free_list in scftorture_invoker() instead of scfp->cpu. The latter is the thread number which can be larger than the number CPUs leading to a crash in such a case. Reported by Boqun Feng. - Clean up the per-CPU lists on module exit. Reported by Boqun Feng. Sebastian Tested-by: Paul E. McKenney