]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails
authorMichał Pecio <michal.pecio@gmail.com>
Tue, 7 Jun 2016 10:34:45 +0000 (12:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 05:15:25 +0000 (22:15 -0700)
commitc66f59ee5050447b3da92d36f5385a847990a894
treef2c31d3fd017c24398a1e9db589a05373342fe85
parent7b2c17f829545df27a910e8d82e133c21c9a8c9c
USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails

Since ed_schedule begins with marking the ED as "operational",
the ED may be left in such state even if scheduling actually
fails.

This allows future submission attempts to smuggle this ED to the
hardware behind the scheduler's back and without linking it to
the ohci->eds_in_use list.

The former causes bandwidth saturation and data loss on isoc
endpoints, the latter crashes the kernel when attempt is made
to unlink such ED from this list.

Fix ed_schedule to update ED state only on successful return.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-q.c