Hi

On Mon, Apr 27, 2009 at 9:06 PM, Mark Ryden <[email protected]> wrote:
> Hello,
>  The following module creates a UDP kernel socket which calls sock_recvms.
> after insmoding the module ,
> netstat -nl | grep 4000 shows that indeed a socket was created and that it
> listens on port 4000.
> However, after running rmmod  on the module, it does **not** close the socket.
> netstat -nl | grep 4000 shows that it **does** exist; the "rmmod"
> itself hangs, and
> there are no kernel messages.
> Any ideas?

I think you should periodically call kthread_should_stop() in your
kernel thread function ( I realize this after browsing lxr.linux.no
for a while). And if it's true (I guess), you should call exit() to
end your thread function.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to