From: Arjan van de Ven <arjan@infradead.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: akpm@osdl.org
Subject: Re: [PATCH] RLIMIT_MEMLOCK accounting of shmctl() SHM_LOCK is broken
Date: Tue, 30 Nov 2004 08:34:20 +0100 [thread overview]
Message-ID: <1101800060.2640.21.camel@laptop.fenrus.org> (raw)
In-Reply-To: <200411292204.iATM4o4C005049@hera.kernel.org>
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 ?
--
next parent reply other threads:[~2004-11-30 7:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200411292204.iATM4o4C005049@hera.kernel.org>
2004-11-30 7:34 ` Arjan van de Ven [this message]
2004-11-30 7:43 ` Andrew Morton
2004-11-30 7:50 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1101800060.2640.21.camel@laptop.fenrus.org \
--to=arjan@infradead.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®