[731] in linux-net channel archive
Re: malloc() woes?
daemon@ATHENA.MIT.EDU (Andrew Walker)
Wed Jul 19 20:35:53 1995
From: andy@keo.kvaerner.no (Andrew Walker)
To: andy@london.keo.kvaerner.no (andy)
Date: Wed, 19 Jul 1995 12:44:40 +0200 (MET DST)
Cc: linux-gcc@vger.rutgers.edu, linux-net@vger.rutgers.edu
In-Reply-To: <no.id> from "andy" at Jul 19, 95 11:57:43 am
andy wrote:
>
> > If I send a SIGHUP to rpc.nfsd or rpc.mountd to re-read /etc/exports they both
> > die with SIGSEGV in malloc, called from auth_init() doing a re-initialize.
> >
> > I'll try to debug things a bit tonight, if I get time.
>
> This bit still holds true. I compiled SunOS versions of rpc.nfsd and rpc.mountd,
> and tested them a bit. There don't seem to be any problems, which points at the
> Linux libc/malloc() - but then how strict is the SunOS libc/malloc() ??????
>
> I think I'll try purify....
For Scott, and the 'linux-gcc' people:
Well, it looks like malloc() is off the hook in this case. There was an uninitialized
pointer being de-referenced and free()'ed. That doesn't help you I suppose, Scott,
but it seems like the answer to the NFS server problems I was having.
For the 'linux-net' people:
The following trivial patch should be applied relative to nfs-server-2.2beta2. It
fixes a problem when auth_free_list() is called on anonymous_client in
auth_init_lists(). This occurs when rpc.mountd/rpc.nfsd receive SIGHUP's.
*** auth.c~ Wed Jun 14 12:57:11 1995
--- auth.c Wed Jul 19 12:30:10 1995
***************
*** 302,307 ****
--- 302,308 ----
cp->flags = 0;
cp->m = NULL;
cp->umap = NULL;
+ cp->next = NULL;
if (hname == NULL) {
if (anonymous_client != NULL) {
-Andy
--
Andy Walker Kvaerner Engineering a.s.
Andrew.Walker@keo.kvaerner.no P.O. Box 222, N-1324 Lysaker, Norway
......if the answer isn't violence, neither is it silence......