bug-hurd
[Top][All Lists]
Advanced

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

Re: Kernel crash on device_map DEVICE_NULL


From: John Tobey
Subject: Re: Kernel crash on device_map DEVICE_NULL
Date: Fri, 23 Nov 2001 00:02:35 -0500
User-agent: Mutt/1.2.5i

On Thu, Nov 22, 2001 at 01:51:12PM -0500, Roland McGrath wrote:
> There is no meaningful sense in which ext2fs.static can "call device_map on
> a null pointer".  device_map is an RPC.  The only way a user task "calls"
> the kernel function is by sending an RPC.  The RPC should never have gotten
> there without a valid receiver port, so I don't see how it's possible.

Good point.  I will have to figure this out.  The port is not null, of
course, but dev_port_lookup() is returning null because its kotype is
IKOT_TASK and not IKOT_DEVICE: no doubt a bug in my code.

There sure are a lot of #ifdef i386 sections in dev_lookup.c and
ds_routines.c, and they don't seem to have anything to do with the
i386 architecture.  They seem to select whether devices use the
dispatch table defined in i386/i386at/device_emul.h.  I wonder if
there is any good reason that device_emul.h is under the i386 branch
and whether the test macro should be MACH_DEVICE_EMUL instead of i386
(and set -DMACH_DEVICE_EMUL in i386/Makefrag).  For OTOP, I am
inserting

#if OTOP
#undef i386
#endif

in those two files.  (Hmmm, I'm not sure if I need -Di386 *anywhere*
anymore.)  Perhaps I should instead copy device_emul.h into otop and
use the virtual table.  I will look in ChangeLog for clues.

Thanks.
-John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]