Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK isbroken

From: Arjan van de Ven
Date: Tue Nov 30 2004 - 02:35:21 EST


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@xxxxxxx
>
> - 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/