Subject: RE: kernel crash with munmap

From: George France <[email-masked]>
Date: Tue, 25 Jul 2000 14:37:50 -0400

Hello Phil;

It has been a long time, since I spoke with you.

It is good that you mentioned your CATS. Although I do not have a solution
to your problem, I have a question for you.

This morning, I was trying to bring up my CATS with 2.4.0-test4-rmk1 (it
used to run NetBSD). It seems that the ide driver is broke. Any ideas?

--George

George France,      [email-masked]
Cambridge Research Laboratory, Compaq Computer Corporation
One Cambridgecenter    MS: CRL
Cambridge, MA 02142 USA

-----Original Message-----
From: Philip Blundell [mailto:[email-masked]]
Sent: Tuesday, July 25, 2000 2:30 PM
To: [email-masked]
Subject: kernel crash with munmap

When I run the program below on my CATS under 2.4.0-test2, the machine locks

up.  It seems to be OK on my i386 with 2.4.0-test5.  Any ideas what might be

wrong?

p.

--

#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>

#define NULL 0

int main(int argc, char *argv)
{
  char *s = tmpnam(NULL);
  int fd = open(s, O_CREAT | O_RDWR);
  int fd2 = open("/bin/ls", O_RDONLY);
  ftruncate(fd, 640*1024);
  unlink(s);
  mmap(0x8000, 640*1024, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE |
MAP_FIXED, fd, 0);
  read(fd2, 0x8000, 640*1024);
  munmap(0x8000, 640*1024);
  exit(0);
}

unsubscribe: body of `unsubscribe linux-arm-kernel' to
[email-masked]

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Tue, 25 Jul 2000 20:19:51 +0100

Hi George,

>used to run NetBSD). It seems that the ide driver is broke. Any ideas?

There does seem to be a problem if you let the IDE driver use DMA.  It used to 
work at one point but it's been broken for quite some time.  I haven't had 
time to investigate so I just hacked the driver to disable DMA.

You probably need to set CONFIG_BLK_DEV_ALI15X3 in your kernel config as well.

Let me know if you still have trouble.

p.