Blob Blame History Raw
From 7c3193094b7d2c7acaedfe9f4c55d8399e763125 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Wed, 28 Sep 2022 12:31:29 +0200
Subject: [PATCH] struct xhci_hcd: restore member now dynamically allocated
Patch-mainline: Never (kABI restoration)
References: git-fixes

Upstream chose to dynamically allocated rather than fix
locking to fix a race. Protect kABI by restoring a member
that is left always NULL, as it sometimes was even before.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/usb/host/xhci.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 49b62434a..7f1c81dfb 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1815,6 +1815,8 @@ struct xhci_hcd {
 	/* slot enabling and address device helpers */
 	/* these are not thread safe so use mutex */
 	struct mutex mutex;
+	/* now dynamically allocated - dummy member always NULL */
+	struct xhci_command	*lpm_command;
 	/* Internal mirror of the HW's dcbaa */
 	struct xhci_virt_device	*devs[MAX_HC_SLOTS];
 	/* For keeping track of bandwidth domains per roothub. */
-- 
2.35.3