Re: [patch] mlock-as-nonroot revisted

From: Arjan van de Ven
Date: Wed Aug 04 2004 - 08:53:01 EST


On Wed, Aug 04, 2004 at 09:31:54AM -0400, Rik van Riel wrote:
> > > @@ -392,8 +392,11 @@ int ipcperms (struct kern_ipc_perm *ipcp
> > > granted_mode >>= 3;
> > > /* is there some bit set in requested_mode but not in granted_mode? */
> > > if ((requested_mode & ~granted_mode & 0007) &&
> > > - !capable(CAP_IPC_OWNER))
> > > - return -1;
> > > + !capable(CAP_IPC_OWNER)) {
> > > + if (!can_do_mlock()) {
> > > + return -1;
> > > + }
> > > + }
> >
> > I still don't see the use for this one. I believe it duplicates
> > SHM_HUGETLB check that's already there.
>
> I'm not sure about your comments here. However, I'm also not
> quite sure about this piece of code. Arjan ? ;)

hmmm looks bullshit now that I look at it again.

Attachment: pgp00000.pgp
Description: PGP signature