]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Fix race condition in channel refcount handling.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 18 Oct 2010 01:54:33 +0000 (03:54 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 3 Dec 2010 05:06:36 +0000 (15:06 +1000)
commitcd98e655f57d54c1d20576832a92b1105103fc9b
treeed2dcd8f88f3be4df90fd1333f3735218e1be21a
parent6ed6e5bb31b8c0a80c02a83cff09c422e1336faf
drm/nouveau: Fix race condition in channel refcount handling.

nouveau_channel_put() can be executed after the 'refcount == 0' check
in nouveau_channel_get() and before the channel reference count is
incremented. In that case CPU0 will take the context down while CPU1
thinks it owns the channel and 'refcount == 1'.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_channel.c