Results 1 to 8 of 8
Hi,
I've programmed a kernel module which connects to another kernel module with a certain load parameter and manages data between that kernel module and user space accessible shared memory.
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-16-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 4
How to load a kernel module twice?
Hi,
I've programmed a kernel module which connects to another kernel module with a certain load parameter and manages data between that kernel module and user space accessible shared memory.
For different devices there are different shared memories and different parameter values while talking to the another kernel module.
I've designed my module to work just with one device and one associated shared memory, but the problem is, I may not load the module more than once with the same name.
If I do compile the source twice, original and via a soft link (ln -s a.c b.c), the resulting a.ko, b.ko are loadable and working at the same time because everything in there is private.
So the final question is:
Is there a normal way to make a kernel module loadable more than once?
- 10-16-2008 #2Just Joined!
- Join Date
- Oct 2008
- Location
- Sialkot
- Posts
- 3
I think you need to remove the one you loaded 1st and then again ...
using command "rmmod your_module_Name"
- 10-16-2008 #3Just Joined!
- Join Date
- Oct 2008
- Posts
- 4
- 10-23-2008 #4Just Joined!
- Join Date
- May 2008
- Posts
- 55
I think,
recompile the module with different name, and put it
- 10-23-2008 #5Just Joined!
- Join Date
- Oct 2008
- Posts
- 4
- 11-07-2008 #6Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Rethinking on design might help. You can maintain a data structure for each individual device and maintain a some kind of list/queue/arrary (depends on your requirement).
- 11-18-2008 #7Just Joined!
- Join Date
- Nov 2008
- Posts
- 5
Use aliases
Use the function: dev_alloc_name(<name>) it will create your module in specific name.
- 11-18-2008 #8


Reply With Quote

