From patchwork Fri Nov 8 10:39:30 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: 13867915 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 6A608D5E154 for ; Fri, 8 Nov 2024 10:42:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF46E6B0092; Fri, 8 Nov 2024 05:42:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA45E6B0096; Fri, 8 Nov 2024 05:42:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1E2B6B009A; Fri, 8 Nov 2024 05:42:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B2CD46B0092 for ; Fri, 8 Nov 2024 05:42:26 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 6DB3F1A0B82 for ; Fri, 8 Nov 2024 10:42:26 +0000 (UTC) X-FDA: 82762587810.15.ECF535E Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf02.hostedemail.com (Postfix) with ESMTP id 7C45C8000B for ; Fri, 8 Nov 2024 10:41:15 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=qfBvYQ6k; dkim=pass header.d=linutronix.de header.s=2020e header.b=p4NsNFlK; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf02.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=1731062373; a=rsa-sha256; cv=none; b=cGvgQZmIGnif+iKvWCttL5Qdn+h2dtytVxrvb4F4cuF7tqtmSsVd1jV4iBWOPqqtIqU9v2 DzXYppSi6xDyZWrMvUka4FoZPTWW7/8hvoSqKw+xkNyVW7+0Bn4t7qOcv5/tKfCAZxGkXF nmMmkU/Ug1UClgkYxOVl2A0WMm240BY= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=qfBvYQ6k; dkim=pass header.d=linutronix.de header.s=2020e header.b=p4NsNFlK; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf02.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=1731062373; 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=Xc/LqlPAYILBsDwML9BEpmuv1miP0xN2teShbWenCQw=; b=qCePBHku5V9XtcrgPThwlYkCJ/DsPRbMGbSXcT+S63mQC01bS/l2CapgTwMFiHbzTOTc++ B+jVf1V5EprjoCRjK+Ld+UuCsSv6LE/k6AhhP31WZ052NgjctJ0kyFlJVHfGOQrGMPr5Ac FNdroKXRgj1xZzJkY90O6ZRhPE1ypl4= From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1731062543; 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=Xc/LqlPAYILBsDwML9BEpmuv1miP0xN2teShbWenCQw=; b=qfBvYQ6kuh5BTSejxUB5x+s9ZknK7JdSMW4KKMetywGm6rkDw2vJas1wrHwKPpgbOH2qod ulWmbP9NqMpRcGZDSBS1L1BfypG14p5lmvIwbpc1HrhCG/XbCWpBqy9+O043glabywK4Mk zrEo6RUn9D4tTGb2KuQQn1xNK8hh1EnJguL2j4o3ZujsBJEoXv3oP8YcUBfqzHwXNIm3Qq 0AhKLXcE4155JytoBY2GEFmKM2gk5OwqzZffpQz/DfWQsXthsclMjMbfjdO6LU1zUV4688 CVCr1LEWzhDZ9eafog4Lr2QijceuMG54YyEluz61JpqSyrj/GE0BkTSkXmLl6Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1731062543; 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=Xc/LqlPAYILBsDwML9BEpmuv1miP0xN2teShbWenCQw=; b=p4NsNFlKqy+U0Z5yvV+sKgK5yBBsTiE6xP+SZwRZ9wzm8O2Mkiqg5B2ybRHzNtaK2Ju3xW crXyW7HKlGogteDA== 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 v3 0/4] scftorture: Avoid kfree from IRQ context. Date: Fri, 8 Nov 2024 11:39:30 +0100 Message-ID: <20241108104217.3759904-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-Stat-Signature: 1eecsfhuf1k48b15pfyudg7ph9k4zkkc X-Rspamd-Queue-Id: 7C45C8000B X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731062475-467116 X-HE-Meta: U2FsdGVkX1+KT7iLWH4z8Ts4iyCPdnNpRo4c+xD0SQpOWlVjl/liDP+avCPD8OH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1QPxdcLOS6UcdMtHroHco8z4g+7XS5rEG6s2GqBPfK7J2bsVOV/mdw2qPatmjIrXQXNi4STWN2g6MAcuq 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. v2…v3: - The clean up on module exit must not be done with thread numbers. Reported by Boqun Feng. - Move the clean up on module exit prior to torture_cleanup_end(). Reported by Paul. 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 Reviewed-by: Boqun Feng Tested-by: Boqun Feng