From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 4E1A24FDA5A; Wed, 30 Sep 2026 16:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790785545; cv=none; b=YSPePUfXs25v2hXTjY8OZajeAyWjkqcYMxve5XlRiM20hfhXCOAAX3OX4LmWdT6lX4RsgIVBq8cW5thHnM2CYn/UmUR/QFfSYDJ3a2+BkPOsapLtklqN2Rzwr7GDq/bTlLm3j561CvOYoTb3b/PLKcL4kWuNP1QiQBvu7VNJ9Cw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790785545; c=relaxed/simple; bh=F5/+c08ibUb1aILY54CZhw6qALtpnQ9NTYI57CqhPkk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pD7yp5MbQUJfXBfIMABaQqbFCXVpjAvGfzEkjMuGDcwkwzC3DBs8/2I7yN6R5n8ZGuK725+oUPBcPllYKiaYzqbLo00ldzyIxvZyNjnZJ2YaMmvez5xbLdXmi3d3gY6wO4ksNcUha+3g12t7qfLbsInR6Y5N4xVlZy1PG9UHauQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y5OKb3Kq; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Y5OKb3Kq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B3951F00893; Wed, 30 Sep 2026 16:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790785531; bh=M8gF9wMpcFXThwg83aWT2hP5++Gk+zo7fv64DOJATuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Y5OKb3Kq0fQYR66cvaj682MfMkHFdkfXpNUI7t2tK4PgBaOecg9u76DkHyCMpH81z vN0tIuB0R0t6VYRo+IkmYVapMEMM6YocwZwhrI8PtWmhS+IJ943F06sBKwa8DnaQXJ ZSgQ/H8l2CPUNDZwtgRSLRAniYplrczGDWAtNfP8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , "Ritesh Harjani (IBM)" , Shivaprasad G Bhat , Amit Machhiwal , Madhavan Srinivasan Subject: [PATCH 6.1 497/982] powerpc/eeh: Fix recursive locking on devices without EEH sensitive driver Date: Wed, 30 Sep 2026 17:20:33 +0200 Message-ID: <20260930152427.457563168@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shivaprasad G Bhat commit c5e68706527968282e49de205cc2b935823cb88a upstream. The commit 1010b4c012b0 ("powerpc/eeh: Make EEH driver device hotplug safe") refactored the EEH code such that the pci_rescan_remove_lock is held at the beginning of eeh_handle_normal_event() and the eeh_reset_device() is called with that lock being held. Looks like the commit missed to remove the existing lock/unlock inside eeh_rmv_device() which is no longer necessary. This is causing the eehd to hang on the lock which it actually holds when that code path is taken. [<0>] 0xc00000011c78f870 [<0>] __switch_to+0xfc/0x1a0 [<0>] pci_lock_rescan_remove+0x30/0x44 [<0>] eeh_rmv_device+0x290/0x2e0 [<0>] eeh_pe_dev_traverse+0x80/0x130 [<0>] eeh_reset_device+0xcc/0x23c [<0>] eeh_handle_normal_event+0x830/0xa80 [<0>] eeh_event_handler+0xf8/0x190 [<0>] kthread+0x194/0x1b0 [<0>] start_kernel_thread+0x14/0x18 The issue is seen for cases where the errors are detected on the PHB directly AND|OR for devices where the driver error_detected() returns PCI_ERS_RESULT_NEED_RESET, and driver being not EEH sensitive(i.e no error handlers like slot_reset(), resume() etc defined). Fixes: 1010b4c012b0 ("powerpc/eeh: Make EEH driver device hotplug safe") Cc: stable Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Shivaprasad G Bhat Reviewed-by: Amit Machhiwal Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/178404937381.913.2759874335293830160.stgit@linux.ibm.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/eeh_driver.c | 2 -- 1 file changed, 2 deletions(-) --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -533,9 +533,7 @@ static void eeh_rmv_device(struct eeh_de if (rmv_data) list_add(&edev->rmv_entry, &rmv_data->removed_vf_list); } else { - pci_lock_rescan_remove(); pci_stop_and_remove_bus_device(dev); - pci_unlock_rescan_remove(); } }