Skip to contentSkip to conversation

Patch "usb: gadget: f_fs: Fix ExtCompat descriptor validation" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: gadget: f_fs: Fix ExtCompat descriptor validation

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-gadget-f_fs-fix-extcompat-descriptor-validation.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 6 17:39:55 CET 2017

From: Vincent Pelletier <[email protected]>
Date: Thu, 15 Dec 2016 12:47:42 +0000
Subject: usb: gadget: f_fs: Fix ExtCompat descriptor validation

From: Vincent Pelletier <[email protected]>

[ Upstream commit 354bc45bf329494ef6051f3229ef50b9e2a7ea2a ]

Reserved1 is documented as expected to be set to 0, but this test fails when it it set to 0. Reverse the condition.

---
 drivers/usb/gadget/function/f_fs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -2263,7 +2263,7 @@ static int __ffs_data_do_os_desc(enum ff
 
 		if (len < sizeof(*d) ||
 		    d->bFirstInterfaceNumber >= ffs->interfaces_count ||
-		    !d->Reserved1)
+		    d->Reserved1)
 			return -EINVAL;
 		for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
 			if (d->Reserved2[i])

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/usb-gadget-f_fs-fix-extcompat-descriptor-validation.patch