Messages in this thread | | | Date | Wed, 3 Aug 2011 23:34:57 +0400 | From | Vasiliy Kulikov <> | Subject | Re: [PATCH] shm: optimize exit_shm() |
| |
On Wed, Aug 03, 2011 at 21:21 +0200, Oleg Nesterov wrote: > > we should check .in_use once again after > > down_write(). > > Why?
https://lkml.org/lkml/2011/8/3/277
"No, as I said in the comment above, other task may be holding the mutex and deleting the last shm segment. So, current task will see in_use == 1 before down_write(), but == 0 after it."
"Should" == additional check might speed the things, so it worth checking.
-- Vasiliy Kulikov http://www.openwall.com - bringing security into open computing environments
| |