From owner-freebsd-hackers Mon Jul 23 22:40:47 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id A911E37B406 for ; Mon, 23 Jul 2001 22:40:41 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 485343E32; Mon, 23 Jul 2001 22:40:41 -0700 (PDT) To: Alfred Perlstein Cc: rootx11@xfreek.mindriot.net, freebsd-hackers@freebsd.org Subject: Re: your mail In-Reply-To: <20010723201232.A68587@sneakerz.org>; from bright@sneakerz.org on "Mon, 23 Jul 2001 20:12:32 -0500" Date: Mon, 23 Jul 2001 22:40:41 -0700 From: Dima Dorfman Message-Id: <20010724054041.485343E32@bazooka.unixfreak.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein writes: > * 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