]> git.ipfire.org Git - people/arne_f/kernel.git/commit
usb: udc: core: Use lock when write to soft_connect
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 14 Jan 2021 08:09:51 +0000 (00:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:05:41 +0000 (11:05 +0100)
commit0336a5a303cbe47f4a4a0615698aa0e7db821daa
tree26545c567bfdaba0d355838944bf5df18ebe339c
parent317d6d0e50517b4585f7e5fbf493fc720d872d04
usb: udc: core: Use lock when write to soft_connect

commit c28095bc99073ddda65e4f31f6ae0d908d4d5cd8 upstream.

Use lock to guard against concurrent access for soft-connect/disconnect
operations when writing to soft_connect sysfs.

Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class")
Cc: stable@vger.kernel.org
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/338ea01fbd69b1985ef58f0f59af02c805ddf189.1610611437.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c