Patch "xhci: fix xhci debugfs errors in xhci_stop" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
xhci: fix xhci debugfs errors in xhci_stop
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xhci-fix-xhci-debugfs-errors-in-xhci_stop.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
11cd764dc9a030991880ad4d51db93918afa5822Mon Sep 17 00:00:00 2001
From: Zhengjun Xing <[email protected]>
Date: Mon, 12 Feb 2018 14:24:51 +0200
Subject: xhci: fix xhci debugfs errors in xhci_stop
From: Zhengjun Xing <[email protected]>
commit 11cd764dc9a030991880ad4d51db93918afa5822 upstream.
In function xhci_stop, xhci_debugfs_exit called before xhci_mem_cleanup. xhci_debugfs_exit removed the xhci debugfs root nodes, xhci_mem_cleanup called function xhci_free_virt_devices_depth_first which in turn called function xhci_debugfs_remove_slot.
Function xhci_debugfs_remove_slot removed the nodes for devices, the nodes folders are sub folder of xhci debugfs.
It is unreasonable to remove xhci debugfs root folder before xhci debugfs sub folder. Function xhci_mem_cleanup should be called before function xhci_debugfs_exit.
--- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/host/xhci.c +1 -2
@@ -652,8 +652,6 @@ static void xhci_stop(struct usb_hcd *hcreturn ; } -xhci_debugfs_exit (xhci); -spin_lock_irq (&xhci->lock); xhci->xhc_state |=XHCI_STATE_HALTED ; xhci->cmd_ring_state =CMD_RING_STATE_STOPPED ;
@@ -685,6 +683,7 @@ static void xhci_stop(struct usb_hcd *hcxhci_dbg_trace (xhci, trace_xhci_dbg_init,"cleaning up memory" );xhci_mem_cleanup (xhci); +xhci_debugfs_exit (xhci);xhci_dbg_trace (xhci, trace_xhci_dbg_init,"xhci_stop completed - status = %x" ,readl (&xhci->op_regs->status));
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/xhci-fix-xhci-debugfs-devices-node-disappearance-after-hibernation.patch queue-4.15/xhci-fix-xhci-debugfs-errors-in-xhci_stop.patch queue-4.15/xhci-xhci-debugfs-device-nodes-weren-t-removed-after-device-plugged-out.patch queue-4.15/xhci-fix-null-pointer-in-xhci-debugfs.patch