Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bd2a207 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: composite: Add spinlock protection for usb string descriptor"

parents 5f5ad727 ccc0b0a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1757,8 +1757,10 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
				value = min(w_length, (u16) value);
			break;
		case USB_DT_STRING:
			spin_lock(&cdev->lock);
			value = get_string(cdev, req->buf,
					w_index, w_value & 0xff);
			spin_unlock(&cdev->lock);
			if (value >= 0)
				value = min(w_length, (u16) value);
			break;