syscall from kernel thread?

From: Peter T. Breuer (
Date: Mon May 08 2000 - 04:51:59 EST

I didn't get any response when I asked about changes designed to help
a module unload _itself_. I have the code working, but lets see if I
can phrase a question that would enable me to avoid changing kernel
interfaces ...

1) how can kernel code make use of a syscall? In particular I want to call
sys_delete_module. But module.c only has a userspace interface and is
linked with asmlinkage, so I've hacked out the code fragments I
needed. Can I avoid doing this?

2) How can init_module get hold of its own name? I changed
mod->init() to pass struct module *mod as an argument to init, but can
I avoid this? Is there a call from within init_module that would deliver
the modules registered name? Then I could pass it to delete_module.

Thanks for any pointers. Incidentally, a module that unloads itself,
or part of itself, is kinda cute. It works nicely.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:11 EST