Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 15:44:48 -0700
From:      Mike Makonnen <makonnen@pacbell.net>
To:        Mike Makonnen <makonnen@pacbell.net>
Cc:        jhb@FreeBSD.ORG, freebsd-smp@FreeBSD.ORG, bright@mu.org
Subject:   Re: Getting resource limits out from under Giant
Message-ID:  <20020713154448.37b47d4a.makonnen@pacbell.net>
In-Reply-To: <20020713152319.75c416a2.makonnen@pacbell.net>
References:  <20020712020633.6a66f187.makonnen@pacbell.net> <XFMail.20020712140932.jhb@FreeBSD.org> <20020713152319.75c416a2.makonnen@pacbell.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 13 Jul 2002 15:23:19 -0700
Mike Makonnen <makonnen@pacbell.net> wrote:

> On Fri, 12 Jul 2002 14:09:32 -0400 (EDT)
> John Baldwin <jhb@FreeBSD.ORG> wrote:
> 
> > 
> > 
> > You need to ensure you have a stable reference to the limits
> > structure. If you are dereferencing p_limit you need to use the proc
> > lock to protect reading that pointer.  The lock also ensure the
> > value is up to date.
> > 
> 
> I see what you mean:
> 
> 	foolimit = p->p_limit->pl_rlimit[FOOLIMIT].rlim_cur;
> 
> is OK. But
> 
> 	plim = p->p_limit;
> 	...
> 	...
> 	foolimit = p->p_limit->pl_rlimit[FOOLIMIT].rlim_cur;

uhh... I meant foolimit = plim->pl_rlimit[FOOLIMIT].rlim_cur;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020713154448.37b47d4a.makonnen>