]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: vim2m: only cancel work if it is for right context
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 11 Jan 2019 12:07:25 +0000 (07:07 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit781555ea0d683d6eef24c1c8657252b8a13a5feb
treef99f0dbe74b8bce83788e814344dded2b5baa7cc
parente6bedde38b9a3f9c93ab36ec95ddf803eb4661f1
media: vim2m: only cancel work if it is for right context

BugLink: https://bugs.launchpad.net/bugs/1844558
[ Upstream commit 240809ef6630a4ce57c273c2d79ffb657cd361eb ]

cancel_delayed_work_sync() was called for any queue, but it should only
be called for the queue that is associated with the currently running job.

Otherwise, if two filehandles are streaming at the same time, then closing the
first will cancel the work which might still be running for a job from the
second filehandle. As a result the second filehandle will never be able to
finish the job and an attempt to stop streaming on that second filehandle will
stall.

Fixes: 52117be68b82 ("media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org> # for v4.20 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/vim2m.c