On 03/10/2015 10:26 AM, Hans Verkuil wrote: > On 03/10/2015 02:18 PM, Ezequiel Garcia wrote: >> Mauro, >> >> Function drivers/media/usb/em28xx/em28xx-video.c:get_next_buf >> (copy pasted below for reference) does not take the list spinlock, >> yet it modifies the list. Is that correct? > > That looks wrong to me. You really need spinlocks here. > OK, second question then. Is there any way to guarantee the URBs irq handler is *not* running, when vb2_ops are called (e.g. stop_streaming)? Otherwise, given stop_streaming will return the current buffer to vb2 (dev->usb_ctl.vid_buf), I believe that will race against the irq handler, which is processing it. It seems that's currently racy as well. -- Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html