usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
authorPeter Chen <peter.chen@nxp.com>
Tue, 23 Jun 2020 03:09:18 +0000 (11:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 14:02:58 +0000 (16:02 +0200)
commitd0b78265cac9d8b5f7d5c97fa44860d6ab952dc8
tree82148f3962e9e23b49f9bdef02603ad7bbe172dd
parent813072b67ee97659807049d014c9d4e36fd62e94
usb: cdns3: ep0: add spinlock for cdns3_check_new_setup

The other thread may access other endpoints when the cdns3_check_new_setup
is handling, add spinlock to protect it.

Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Cc: <stable@vger.kernel.org>
Reviewed-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Link: https://lore.kernel.org/r/20200623030918.8409-4-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/ep0.c