All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to directly call do_path_lookup() in kernel?
@ 2007-01-23 18:32 Xin Zhao
  2007-01-24  7:33 ` Xin Zhao
  0 siblings, 1 reply; 4+ messages in thread
From: Xin Zhao @ 2007-01-23 18:32 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-24  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 18:32 Is it possible to directly call do_path_lookup() in kernel? Xin Zhao
2007-01-24  7:33 ` Xin Zhao
2007-01-24  7:43   ` [newbie] " Oleg Verych
2007-01-24  7:59     ` Xin Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.