Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken
From: Arjan van de Ven (arjan_at_infradead.org)
Date: 11/30/04
- Previous message: Thomas Spatzier: "Re: [patch 4/10] s390: network driver."
- Next in thread: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"
- Reply: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org> 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/
- Previous message: Thomas Spatzier: "Re: [patch 4/10] s390: network driver."
- Next in thread: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"
- Reply: Andrew Morton: "Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|