From 49b47c130abad25bbd1b395ca6bde698580bd4df Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Fri, 11 Oct 2024 13:31:30 -0700 Subject: [PATCH] nvme: fix breakage on UEK7 U3 caused by mlx5 update Signed-off-by: Stephen Brennan --- drgn_tools/nvme.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drgn_tools/nvme.py b/drgn_tools/nvme.py index 3feb1e33..1fee910a 100755 --- a/drgn_tools/nvme.py +++ b/drgn_tools/nvme.py @@ -215,7 +215,12 @@ def for_each_msi_desc(pdev: Object) -> Iterable[Object]: # structure. list = pdev.dev.msi.data.list - if list is not None: + # Unfortunately, some of the commits below (which switch to an xarray) have + # been backported without deleting the list_heads above. This leaves a valid + # list in these structures, but with null next/prev fields. Detect NULL + # entries here and assume that's the case, falling through to the xarray + # case. + if list is not None and list.next: return list_for_each_entry( "struct msi_desc", list.address_of_(), "list" )