From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from confino.investici.org (confino.investici.org [93.190.126.19]) (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 A49591547C0 for ; Sat, 11 Jul 2026 00:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.190.126.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783729384; cv=none; b=tnrZTGh9t4zXRCrk/0aBNZiijQkUZAqhMfJqp2chsGmz42m1Tu0g3dCSr6x4MQ4Ts5YBzJtRu91drSWVUvLCbFZMgMmisDjBQgdQmgVFKk3UpopRBK8gERjVc2ci0vt2IyfYccfbcPnPK6Wini31YnhBKwZDjRZtY0WebVT8zqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783729384; c=relaxed/simple; bh=CCN4JQ5rtOSRx02h0aq24bmN1fKCquFkOnTYf29pFD0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wtwk1g/n4N7zElwDlR3+p2FE1+/FXz0Rd0gOiY+AjI9vNwFzlkJ8u7hE9g3iJvjTyaBVyB3Si81xiDdWWYThRjoFI0i0dLK/sfGubuxGWyFZpgg6OQdil2KOsVe3MEKTKsibMkR+ntnP/bgaHxfzljvN+jEMf4pQbPKqu00NSb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net; spf=pass smtp.mailfrom=grrlz.net; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b=UsTLDd/K; arc=none smtp.client-ip=93.190.126.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=grrlz.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b="UsTLDd/K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grrlz.net; s=stigmate; t=1783729375; bh=CSfqyZKLFQM4Wi3dU8k0/tyPS8lAXJVsZDngsM4+Hxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UsTLDd/KLNxd4MCJuEmR5cQaIzds1sUghMXGUfWuvXcP4q41Xl9ZS4QTFnX8ati2L NSd2VRR9fEDPuGi7qIA6aMuTGZ1Nsxdu1J/8JKyw++IUwSgCmg+Ls8DNM90E9kI++B lbARkp63V/UM36AVBZawsjSYiu6xU7VV8sEeePzg= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4gxqCz2Hkhz114b; Sat, 11 Jul 2026 00:22:55 +0000 (UTC) Received: by mx1.investici.org (Postfix) id 4gxqCy4tCjz113X; Sat, 11 Jul 2026 00:22:54 +0000 (UTC) From: Bradley Morgan To: akpm@linux-foundation.org Cc: baoquan.he@linux.dev, pmladek@suse.com, feng.tang@linux.alibaba.com, gregkh@linuxfoundation.org, arnd@arndb.de, corbet@lwn.net, rdunlap@infradead.org, gpiccoli@igalia.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, include@grrlz.net Subject: [RFC PATCH 3/4] misc/pvpanic: notify the host on the pre kdump list Date: Sat, 11 Jul 2026 00:22:52 +0000 Message-ID: <20260711002253.1115-4-include@grrlz.net> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260711002253.1115-1-include@grrlz.net> References: <20260711002253.1115-1-include@grrlz.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Writing the panic event to the pvpanic device is a self contained upcall, and pvpanic_send_event() already takes pvpanic_lock with a trylock, so the callback satisfies the contract as is. The INT_MAX priority is kept so the host hears about the panic before anything else on the list runs. Signed-off-by: Bradley Morgan --- drivers/misc/pvpanic/pvpanic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/misc/pvpanic/pvpanic.c b/drivers/misc/pvpanic/pvpanic.c index 17c0eb549463..c409968228e4 100644 --- a/drivers/misc/pvpanic/pvpanic.c +++ b/drivers/misc/pvpanic/pvpanic.c @@ -218,7 +218,7 @@ static int pvpanic_init(void) INIT_LIST_HEAD(&pvpanic_list); spin_lock_init(&pvpanic_lock); - atomic_notifier_chain_register(&panic_notifier_list, &pvpanic_panic_nb); + panic_notifier_register_pre_kdump(&pvpanic_panic_nb); return 0; } @@ -226,7 +226,6 @@ module_init(pvpanic_init); static void pvpanic_exit(void) { - atomic_notifier_chain_unregister(&panic_notifier_list, &pvpanic_panic_nb); - + panic_notifier_unregister_pre_kdump(&pvpanic_panic_nb); } module_exit(pvpanic_exit); -- 2.53.0