]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Sep 2020 14:18:00 +0000 (16:18 +0200)
commitb7a1e7f2d4eef68f4183b6f7b6e9b6b202839df0
tree85fee499b045f5c18d0b8792e4e8de142612cc07
parent885e3d87a387e9a83e8f416fc903b13ddd41a6e4
xhci: don't create endpoint debugfs entry before ring buffer is set.

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: 2100b998f426 ("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>
drivers/usb/host/xhci.c