From: "Xin Zhao" <uszhaoxin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Is it possible to directly call do_path_lookup() in kernel?
Date: Tue, 23 Jan 2007 13:32:17 -0500 [thread overview]
Message-ID: <4ae3c140701231032xd6eca27td46cc1c25e150e25@mail.gmail.com> (raw)
Hi,
I tried to call the following code in a kernel module:
error = do_path_lookup(AT_FDCWD, "/etc/profile.d/glib2.csh",
LOOKUP_PARENT, &nd);
I exported the function do_path_lookup() using
"EXPORT_SYMBOL_GPL(do_path_lookup);"
But do_path_lookup() caused the "general protection fault: 0000 [#1]"
kernel error.
I thought it could be the problem of protection error, so I used the
following codes to enclose the code that calls do_path_lookup(), but
still got the same error.
fs = get_fs (); /* save previous value */
set_fs (KERNEL_DS); /* use kernel limit */
......
set_fs(fs);
Any idea on this?
Thanks a lot!
-x
next reply other threads:[~2007-01-23 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 18:32 Xin Zhao [this message]
2007-01-24 7:33 ` Xin Zhao
2007-01-24 7:43 ` [newbie] " Oleg Verych
2007-01-24 7:59 ` Xin Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ae3c140701231032xd6eca27td46cc1c25e150e25@mail.gmail.com \
--to=uszhaoxin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®