Messages in this thread | | | Subject | Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken | From | Arjan van de Ven <> | Date | Tue, 30 Nov 2004 08:34:20 +0100 |
| |
On Mon, 2004-11-29 at 21:38 +0000, Linux Kernel Mailing List wrote: > ChangeSet 1.2251, 2004/11/29 13:38:43-08:00, mtk-lkml@gmx.net > > - spin_lock(&shmlock_user_lock); > - locked = size >> PAGE_SHIFT; > + locked = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; > lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; > lock_limit >>= PAGE_SHIFT; > + spin_lock(&shmlock_user_lock);
after this change... isn't the use to the current->signal->rlim[RLIMIT_MEMLOCK] entirely unlocked and thus racey ? --
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |