]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: host: Fix channel refcount issues
authorArto Merilainen <amerilainen@nvidia.com>
Mon, 14 Jul 2014 13:43:37 +0000 (16:43 +0300)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 17 Oct 2014 17:56:48 +0000 (10:56 -0700)
commit0f0a500c8528aa9432b1a00a3e148c6856d8eb0f
tree357b412b6d133f56d92b2a8746f799baccf4e3bc
parent6876f819d21ef127f98999e3f21d83ecd402956b
video: tegra: host: Fix channel refcount issues

This patch fixes few possible races in channel initialisation and
deinitialisation:
- If two channel initialisations were running concurrently for
the same device and the first initialisation failed, we potentially
gave an uninitialised channel to the second requester
- If putchannel() triggered uninitialisation, we were still able
to give the channel in getchannel().

Bug 200013323

Change-Id: I99fa726db99fbb98401d5703cc2572131907f726
(cherry picked from commit 4fb20fef4a9eaf222c3f6d4c83fcb495f207c478)
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/498509
Reviewed-on: http://git-master/r/538725
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
drivers/video/tegra/host/host1x/host1x_channel.c
drivers/video/tegra/host/nvhost_channel.c
drivers/video/tegra/host/nvhost_channel.h