]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
media: vimc: stream: fix thread state before sleep
authorHelen Fornazier <helen.koike@collabora.com>
Wed, 6 Mar 2019 22:42:38 +0000 (17:42 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
commitc35aafa6573f313de28a08ae30faacb8c026af43
tree11a8c36955ed9e4c82219f3afcc2cb53f81c0e42
parentb3789d256a8472cdb1583164f4d30af15d7da20d
media: vimc: stream: fix thread state before sleep

BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit 2978a505aaa981b279ef359f74ba93d25098e0a0 ]

The state TASK_UNINTERRUPTIBLE should be set just before
schedule_timeout() call, so it knows the sleep mode it should enter.
There is no point in setting TASK_UNINTERRUPTIBLE at the initialization
of the thread as schedule_timeout() will set the state back to
TASK_RUNNING.

This fixes a warning in __might_sleep() call, as it's expecting the
task to be in TASK_RUNNING state just before changing the state to
a sleeping state.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/platform/vimc/vimc-streamer.c