Can't cleanly unload driver

Eric Fowler eric.fowler at gmail.com
Fri Dec 27 19:10:43 EST 2013


I have checked that and the problem persists.

[eric at localhost parprt]$ ls -la /lib/modules/`uname -r`/build
lrwxrwxrwx. 1 root root 23 Dec 23 17:06 /lib/modules/3.12.6/build ->
/home/eric/build/kernel
[eric at localhost parprt]$ pwd
/home/eric/drivers/parprt
[eric at localhost parprt]$ ls -la /lib/modules/`uname -r`/build
lrwxrwxrwx. 1 root root 23 Dec 23 17:06 /lib/modules/3.12.6/build ->
/home/eric/build/kernel
[eric at localhost parprt]$ ls -la *.ko
-rw-rw-r--. 1 eric eric 86187 Dec 27 15:18 foobar.ko

[eric at localhost parprt]$ su
Password:****
[root at localhost parprt]# /sbin/insmod ./foobar.ko
insmod: ERROR: could not insert module ./foobar.ko: File exists
[root at localhost parprt]# rmmod foobar
rmmod: ERROR: Module foobar is not currently loaded
[root at localhost parprt]# rmmod foobar.ko
rmmod: ERROR: Module foobar is not currently loaded
[root at localhost parprt]# modinfo  foobar
modinfo: ERROR: Module foobar not found.










On Thu, Dec 26, 2013 at 9:55 PM, <Valdis.Kletnieks at vt.edu> wrote:

> On Thu, 26 Dec 2013 17:50:52 -0800, Eric Fowler said:
>
> > I did an insmod ./mydriver.ko
>
> > But rmmod reports Module mydriver is not currently loaded.
> >
> > But it is in /proc/devices:
> > 248 mydriver
> >
> > Trying to reload it gives:
> > insmod ./mydriver.ko
> >
> > Could not insert module mydriver.ko: File exists.
>
> Out of curiosity, what name is reported if you do an 'lsmod' after
> loading it?  And what's the reference count on it?  I wonder if
> you're ever-so-slightly out of sync someplace (a 'mydriver' in one
> place, and 'Mydriver' in another, or something equally misbegotten).
>



-- 
cc:NSA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131227/2849560c/attachment.html 


More information about the Kernelnewbies mailing list