Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2001 22:40:41 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Alfred Perlstein <bright@sneakerz.org>
Cc:        rootx11@xfreek.mindriot.net, freebsd-hackers@freebsd.org
Subject:   Re: your mail 
Message-ID:  <20010724054041.485343E32@bazooka.unixfreak.org>
In-Reply-To: <20010723201232.A68587@sneakerz.org>; from bright@sneakerz.org on "Mon, 23 Jul 2001 20:12:32 -0500"

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <bright@sneakerz.org> writes:
> * rootx11@xfreek.mindriot.net <rootx11@xfreek.mindriot.net> [010723 19:47] wr
> ote:
> > Hello
> > I am experimenting with kernel modules and am trying to write to a file.
> > This is the syscall function (sorry of my terminology is messed up)
> > 
> > static int write_file(struct proc *p, void *arg) {
> > 	struct write_args *wstructure;
> > 	struct open_args *ostructure;

Notice how you (the originator) never allocated memory for these
structures, so this assignment:

> > 	ostructure->path="/tmp/blehfile";

dereferences junk on the stack.  Once you've fixed that, of course,
you'll have to fix all the issues Alfred and Andrew told you about.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010724054041.485343E32>