]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xhci: don't create endpoint debugfs entry before ring buffer is set.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 18 Sep 2020 13:17:51 +0000 (16:17 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:48:48 +0000 (14:48 +0100)
commit4d2b193f7d273a5ca76cc98da7df032b7745add3
tree9270704f1a67b1424de26c0bc9f7989a79e0b0d8
parent15692cce344b1cfb0ee968bdb3025c37f9231df9
xhci: don't create endpoint debugfs entry before ring buffer is set.

BugLink: https://bugs.launchpad.net/bugs/1902115
[ Upstream commit 167657a1bb5fcde53ac304ce6c564bd90a2f9185 ]

Make sure xHC completes the configure endpoint command and xhci driver
sets the ring pointers correctly before we create the user readable
debugfs file.

In theory there was a small gap where a user could have read the
debugfs file and cause a NULL pointer dereference error as ring
pointer was not yet set, in practise we want this change to simplify
the upcoming streams debugfs support.

Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200918131752.16488-10-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/usb/host/xhci.c