Re: cannot release a UDP kernel socket - why ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Mon, Apr 27, 2009 at 9:06 PM, Mark Ryden <markryde@xxxxxxxxx> 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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux