usb: gadget: uvc: configfs: Prevent format changes after linking header
authorJoel Pepper <joel.pepper@rwth-aachen.de>
Tue, 29 May 2018 19:02:12 +0000 (21:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:47:20 +0000 (18:47 +0100)
commitd036103870c6d6d069e4a751716650ef4b40783e
treeb08f11b57efeb6227e928ee73b91470ee0777814
parente6e1ad1e2537b908cbee144538db778aa3d57546
usb: gadget: uvc: configfs: Prevent format changes after linking header

[ Upstream commit cb2200f7af8341aaf0c6abd7ba37e4c667c41639 ]

While checks are in place to avoid attributes and children of a format
being manipulated after the format is linked into the streaming header,
the linked flag was never actually set, invalidating the protections.
Update the flag as appropriate in the header link calls.

Signed-off-by: Joel Pepper <joel.pepper@rwth-aachen.de>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/function/uvc_configfs.c