Am 24.09.2014 um 01:18 schrieb Mauro Carvalho Chehab: > Em Tue, 23 Sep 2014 21:32:02 +0200 > Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> escreveu: > >> Am 19.09.2014 um 18:02 schrieb Mauro Carvalho Chehab: >>> When both VBI and video are streaming, and video stream is stopped, >>> a subsequent trial to restart it will fail, because S_FMT will >>> return -EBUSY. >>> >>> That prevents applications like zvbi to work properly. >>> >>> Please notice that, while this fix it fully for zvbi, the >>> best is to get rid of streaming_users and res_get logic as a hole. >>> >>> However, this single-line patch is better to be merged at -stable. >>> >>> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> >>> >>> diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c >>> index 08569cbccd95..d75e7f82dfb9 100644 >>> --- a/drivers/media/usb/em28xx/em28xx-video.c >>> +++ b/drivers/media/usb/em28xx/em28xx-video.c >>> @@ -1351,7 +1351,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, >>> struct em28xx *dev = video_drvdata(file); >>> struct em28xx_v4l2 *v4l2 = dev->v4l2; >>> >>> - if (v4l2->streaming_users > 0) >>> + if (vb2_is_busy(&v4l2->vb_vidq)) >> Looks dangerous. > Why Dangerous? You are an experienced kernel developer. If you still fail to see that after so many years, sorry, I can't help you. > Did you identify any problem? Yes I've identified a potential problem. Read it again, it's in the line you skipped in this reply. > With what application? I would be willing to spend more time on this and test this critical patch (like I already did in the past). But I don't have access to analog TV here at the moment, sorry. It would have to wait ~2 weeks. My fault. I shouldn't have wasted any time on reviewing your patch. Regards, Frank -- 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