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 4008B145329 for ; Sun, 14 Sep 2025 00:35:39 +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=1757810139; cv=none; b=c4mbWm5EAgIXySSIxgi72IsbqF1M14foqDAGwEJJLIan/8aY+RMyabzw9TCjl6mvsvVATNGZzBHtyXDh3tggFW2YD8CvBat8QJ5YS5MBYavrzMnAFWSScjsnWTpsF0joMjsfFFgwGxx7dmIZgZVyPdAnnCRkmOak+rPM/8coZkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757810139; c=relaxed/simple; bh=66a8PYEVKZITnZURsOwOLwSjWPqEKQP76Wy0d66WY4E=; h=Date:To:From:Subject:Message-Id; b=G18+pXIKo8kxU06rp8YzF00RzJm3UqfN+mrYAPAgiyTu8p0CRmv/G1sJV8qRBM5gDqyqm1S/CTAZRPygOW1F3Eq4b1LVVhhFJNhOS+sQ01RIPCNUJFCIJOsEbhiwzd1xXJtK9SGbxDvTYJ75bxm4OeaOEaoFHuJ6IIKuapz5Hak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=SqLFek6r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="SqLFek6r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06654C4CEEB; Sun, 14 Sep 2025 00:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1757810139; bh=66a8PYEVKZITnZURsOwOLwSjWPqEKQP76Wy0d66WY4E=; h=Date:To:From:Subject:From; b=SqLFek6rpi7VPFuALabB/A3Bi9O99oCix3QlV2558N/5pTUDj4k0hmQuyiRtZadUF l12B8VU0nlPiEsiEUe3VT/KAEoq09NR6YwzGfyBEXHczSp4AsAONq27+39EIt7RCMZ AToPNEKu/5OTFADrmDVmmnOWl29zycpa/NY4IPwc= Date: Sat, 13 Sep 2025 17:35:38 -0700 To: mm-commits@vger.kernel.org,yury.norov@gmail.com,yangyicong@hisilicon.com,ville.syrjala@linux.intel.com,vgoyal@redhat.com,tzimmermann@suse.de,tony.luck@intel.com,tj@kernel.org,thorsten.blum@linux.dev,tglx@linutronix.de,sohil.mehta@intel.com,senozhatsky@chromium.org,rostedt@goodmis.org,qianqiang.liu@163.com,pmladek@suse.com,oushixiong@kylinos.cn,namcao@linutronix.de,mingo@kernel.org,max.kellermann@ionos.com,luogengkun@huaweicloud.com,lihuafei1@huawei.com,kees@kernel.org,Jonathan.Cameron@huawei.com,john.ogness@linutronix.de,joel.granados@kernel.org,jgg@ziepe.ca,gpiccoli@igalia.com,dyoung@redhat.com,djwong@kernel.org,dianders@chromium.org,deller@gmx.de,cuiyunhui@bytedance.com,bhe@redhat.com,anna.schumaker@oracle.com,wangjinchao600@gmail.com,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-nonmm-stable] crash_core-use-panic_try_start-in-crash_kexec.patch removed from -mm tree Message-Id: <20250914003539.06654C4CEEB@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: crash_core: use panic_try_start() in crash_kexec() has been removed from the -mm tree. Its filename was crash_core-use-panic_try_start-in-crash_kexec.patch This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Jinchao Wang Subject: crash_core: use panic_try_start() in crash_kexec() Date: Mon, 25 Aug 2025 10:29:31 +0800 crash_kexec() had its own code to exclude parallel execution by setting panic_cpu. This is already handled by panic_try_start(). Switch to panic_try_start() to remove the duplication and keep the logic consistent. Link: https://lkml.kernel.org/r/20250825022947.1596226-4-wangjinchao600@gmail.com Signed-off-by: Jinchao Wang Cc: Anna Schumaker Cc: Baoquan He Cc: "Darrick J. Wong" Cc: Dave Young Cc: Doug Anderson Cc: "Guilherme G. Piccoli" Cc: Helge Deller Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Joanthan Cameron Cc: Joel Granados Cc: John Ogness Cc: Kees Cook Cc: Li Huafei Cc: "Luck, Tony" Cc: Luo Gengkun Cc: Max Kellermann Cc: Nam Cao Cc: oushixiong Cc: Petr Mladek Cc: Qianqiang Liu Cc: Sergey Senozhatsky Cc: Sohil Mehta Cc: Steven Rostedt Cc: Tejun Heo Cc: Thomas Gleinxer Cc: Thomas Zimemrmann Cc: Thorsten Blum Cc: Ville Syrjala Cc: Vivek Goyal Cc: Yicong Yang Cc: Yunhui Cui Cc: Yury Norov (NVIDIA) Signed-off-by: Andrew Morton --- kernel/crash_core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) --- a/kernel/crash_core.c~crash_core-use-panic_try_start-in-crash_kexec +++ a/kernel/crash_core.c @@ -4,6 +4,7 @@ * Copyright (C) 2002-2004 Eric Biederman */ +#include "linux/panic.h" #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include @@ -143,17 +144,7 @@ STACK_FRAME_NON_STANDARD(__crash_kexec); __bpf_kfunc void crash_kexec(struct pt_regs *regs) { - int old_cpu, this_cpu; - - /* - * Only one CPU is allowed to execute the crash_kexec() code as with - * panic(). Otherwise parallel calls of panic() and crash_kexec() - * may stop each other. To exclude them, we use panic_cpu here too. - */ - old_cpu = PANIC_CPU_INVALID; - this_cpu = raw_smp_processor_id(); - - if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) { + if (panic_try_start()) { /* This is the 1st CPU which comes here, so go ahead. */ __crash_kexec(regs); @@ -161,7 +152,7 @@ __bpf_kfunc void crash_kexec(struct pt_r * Reset panic_cpu to allow another panic()/crash_kexec() * call. */ - atomic_set(&panic_cpu, PANIC_CPU_INVALID); + panic_reset(); } } _ Patches currently in -mm which might be from wangjinchao600@gmail.com are