Re: Call of tty->driver.write provides segmentation fault

From: Russell King
Date: Thu Sep 04 2003 - 04:55:43 EST


On Thu, Sep 04, 2003 at 11:07:11AM +0200, Laurent Hugé wrote:
> I'm currently contriving a network driver using the serial port.
> I've created my own line discipline (and tests prove it reads well), but I
> can't write to the port : I tried to use tty->driver.write(tty, 0, msg,
> strlen(msg)) (the same way that in printk.c, i.e. after testing that
> tty->driver.write exists) but it crashs into a segmentation fault.
> Since the driver implementation is not mine (I'm just using the serial
> module), I can't check the function's address, but I believe the tty is
> ok (it is the same I use for the line discipline).

You need to look at the kernel messages - normally you'll find an
"oops" in there when this happens. If the dump doesn't contain
symbolic information (ie, the function names) you'll need to pass
it though ksymoops to decode it (using the correct System.map file
for the kernel which generated the dump.)

If you do use ksymoops, be sure to include the original oops dump -
ksymoops appears to drop some lines from the oops dump.

--
Russell King (rmk@xxxxxxxxxxxxxxxx) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

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