summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTuomas Tynkkynen <ttynkkynen@nvidia.com>2012-08-15 17:54:38 +0300
committerSimone Willett <swillett@nvidia.com>2012-08-27 17:17:27 -0700
commitce8ef677d55d74149d75a0ccf8e3b493bf68e110 (patch)
treee908741d51a483cad669e91e957ffb160aeb7315 /sound
parentb536b496165f0de2e854e6297f54371e27233dd2 (diff)
video: tegra: nvmap: fix handle usecount tracking
A handle's usecount used to be incremented once during the mmap ioctl, and decremented when the mapping is closed by the kernel. However, that fails if a mapping cloned, for example if the mapping was split due to a munmap, or (presumably) during fork, as the decrement will then happen for each cloned mapping. Therefore increment the usecount when a mapping is opened. Also fix a BUG_ON() that would have caught this bug, if it wouldn't have done the check by checking if the unsigned usecount field is less than zero. Bug 1033981 Change-Id: I72ac9361a19e44f91ffd6b1126f4632e0f7b6726 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/123710 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions