[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Init error on kernel v2.3.6



On Mon, 21 Jun 1999, Raghavendra Bhat wrote:

> AMD-K6 users are reported to have this problem.  Other i386 processors
> like Pentium, Pentium Pro, Pentium II users do not have this problem
> and the kernel v2.3.6 worked fine for them.

I had this problem, and my CPU is a Pentium II 350MHz (Deschutes),
stepping 2.  I don't think it's a CPU thing at all.

Before I give you the fix, I'll repeat the reminder that someone (Brad?) 
gave to the list:  Kernels with odd second digits are experimental, and
should be expected to break and trash filesystems at will.

Now, here's Paul Mackerras' patch.  I'm running 2.3.6-ac1 and it works
perfectly now.  Unless the 2.3.7-pre series is finished and 2.3.7 has been
released (which, from checking my local kernel.org mirror, I see it's not,
yet) I highly recommend you stay with 2.3.6 as lots of filesystem
corruptions are being reported from 2.3.7-pre.  Actually, I recommend you
stick to 2.2.10, but you chose not to already. :>

----- Begin forwarded message -----
Date: Fri, 11 Jun 1999 13:24:23 +1000 (EST)
From: Paul Mackerras <paulus@cs.anu.edu.au>
Reply-To: Paul.Mackerras@cs.anu.edu.au
To: linux-kernel@vger.rutgers.edu
Subject: init failing in 2.3.6

I am seeing a problem with 2.3.6 where init is failing to start
correctly with an error about not being able to map shared libraries.
(This is on my powermac with the current vger tree, but that's very
close to the official tree these days.)

The problem is that an mmap is failing with ENOMEM.  I tracked this
down to the do_munmap call from do_mmap failing because the address
was not page-aligned.  It wasn't page-aligned because
get_unmapped_area was returning an non-page-aligned address, because
there was a vma with a non-page-aligned end value.  This in turn was
because earlier on, during an execve syscall, load_elf_interp had
called do_brk with a len parameter which wasn't a multiple of the page
size.

I am about to try this patch, which makes do_brk page-align its len
parameter:

--- mm/mmap.c~	Thu Jun 10 09:49:31 1999
+++ mm/mmap.c	Tue Jun 11 21:48:50 2019
@@ -728,6 +728,9 @@
 	struct vm_area_struct * vma;
 	unsigned long flags, retval;
 
+	if ((len = PAGE_ALIGN(len)) == 0)
+		return addr;
+
 	/*
 	 * mlock MCL_FUTURE?
 	 */

If instead all callers of do_brk should ensure that len is a multiple
of the page-size, I'm sure someone will post a better patch. :-)

Paul.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----


I hope this helps.

-- 
William Ono <wmono@debian.org>                             PGP key: 0x93BA6AFD
 fingerprint = E3 64 C5 43 3E B3 2D A6  C6 D7 E3 45 90 24 78 DE = fingerprint
PGP-encrypted mail welcome!           "640k ought to be enough for everybody."


Reply to: