]> git.baikalelectronics.ru Git - kernel.git/commit
memstick: avert possible race condition between idr_pre_get and idr_get_new
authorAlex Dubov <oakad@yahoo.com>
Thu, 13 Jan 2011 01:01:04 +0000 (17:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:22 +0000 (08:03 -0800)
commitc900d24ed2657bfc4792e1ed9d77ea4781a0851a
treec9b17bcf583e047ecb55bf775b55053c85b21935
parent18c13b6d6ff1942299c1744f7f2e426c82e2fee8
memstick: avert possible race condition between idr_pre_get and idr_get_new

Implement the usual pattern around idr_pre_get() and idr_get_new() to
handlethe situation where another thread concurrently steals this thread's
idr_pre_get() preallocation.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/memstick/core/memstick.c
drivers/memstick/core/mspro_block.c