]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 12 Aug 2016 07:07:09 +0000 (09:07 +0200)
commita06f90fb25780cd477538f7898ce9770eb2c2263
treea55720b14a2a23e6e58e607bb1b3e8eb56aa6d06
parent9af6c8be13f689625ff27b37ac3c8f386e1b4af2
USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails

BugLink: http://bugs.launchpad.net/bugs/1611833
commit c66f59ee5050447b3da92d36f5385a847990a894 upstream.

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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/usb/host/ohci-q.c