]> git.hungrycats.org Git - linux/commit
xhci: init command timeout timer earlier to avoid deleting it uninitialized
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 21 Sep 2015 14:46:17 +0000 (17:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:49:26 +0000 (14:49 -0700)
commitad89cfd0e8aa0599d4c2052cf2e7103a01006521
tree67d4688e0dd4b917f25d01a868c85300bb7cb22d
parent4069e26916de74b9ffbf1a1326f47e26a4113027
xhci: init command timeout timer earlier to avoid deleting it uninitialized

commit cc8e4fc0c3b5e8340bc8358990515d116a3c274c upstream.

Don't check if timer is running with a timer_pending() before
deleting it with del_timer_sync(), this defies the whole point of
the sync part and can cause a possible race.

Instead we just want to make sure the timer is initialized early enough
before we have a chance to delete it.

Reported-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c