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)
committerFelipe Balbi <balbi@kernel.org>
Wed, 24 Jun 2020 06:39:14 +0000 (09:39 +0300)
commit2587a029fa2a877d0a8dda955ef1b24c94b4bd0e
tree62b52ee9f9f79bcb980a8c887baa211945f6cc6d
parentba3a80fe0fb67d8790f62b7bc60df97406d89871
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.

Cc: <stable@vger.kernel.org>
Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Reviewed-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/cdns3/ep0.c