From: Thomas Pugliese Date: Tue, 4 Mar 2014 17:24:55 +0000 (-0600) Subject: usb: wusbcore: fix potential double list_del on urb dequeue X-Git-Tag: v3.15-rc1~137^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a6da97ff530650d26570a6a1ec0ac1deac927bd;p=pandora-kernel.git usb: wusbcore: fix potential double list_del on urb dequeue This patch locks rpipe->seg_lock around the entire transfer segment cleanup loop in wa_urb_dequeue instead of just one case of the switch statement. This fixes a race between __wa_xfer_delayed_run and wa_urb_dequeue where a transfer segment in the WA_SEG_DELAYED state could be removed from the rpipe seg_list twice leading to memory corruption. It also switches the spin_lock call to use the non-irqsave version since the xfer->lock is already held and irqs already disabled. Signed-off-by: Thomas Pugliese Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed