- balloon: don't crash in HVM-with-PoD guests.
[opensuse:kernel-source.git] / patches.xen / 1249-usbback-fix-1232.patch
1 From http://xenbits.xen.org/hg/linux-2.6.18-xen.hg/rev/f2e452d98624
2 From: xen-devel@lists.xenproject.org
3 Patch-mainline: n/a
4 Subject: usbback: fix after c/s 1232:8806dfb939d4
5 References: bnc#842553
6
7 That c/s ("backends: Check for insane amounts of requests on the ring")
8 copied from blkback/blktap/scsiback a switch statement that is valid
9 there, but not here - the return value from usbbk_start_submit_urb()
10 could be any positive value, not just one.
11
12 Signed-off-by: Jan Beulich <jbeulich@suse.com>
13
14 --- 13.1.orig/drivers/xen/usbback/usbback.c     2014-02-10 16:14:09.000000000 +0100
15 +++ 13.1/drivers/xen/usbback/usbback.c  2014-02-10 16:14:15.000000000 +0100
16 @@ -1013,7 +1013,7 @@ static int usbbk_start_submit_urb(usbif_
17  
18         RING_FINAL_CHECK_FOR_REQUESTS(&usbif->urb_ring, more_to_do);
19  
20 -       return more_to_do;
21 +       return !!more_to_do;
22  }
23  
24  void usbbk_hotplug_notify(usbif_t *usbif, int portnum, int speed)