Hi, I have implemented a server in kernel space. This server uses UDP socket. I create a kernel_thread to execute the server and it sleeps in recvfrom. When I cleanup the module, I release the socket. The problem is: when I make lsmod the module there isn't, but if I execute the ps command I see the image of thread. And if I kill it, I cause a oops in kernel. Why? What's the problem? I think problem is in socket, but how can I solve it? Many Thanks. I list a little of my code: // * In init kernel_thread(kserv_main, NULL,0); // * In kserv_main atomic_inc(&DaemonCount); (...) while (!signal_pending(current) && !kserv_shutdown) { len = k_recvfrom(sock, &cli_addr, (char *)&rcv_request); (...) } // * before exit by thread atomic_dec(&DaemonCount); wake_up(&kserv_wait_threads);// dichiarata in precedenza sock_release(sock); return 0; // * end main // * in cleanup kserv_shutdown = 1; kill_proc(DaemonPid, SIGTERM, 1); wait_event(kserv_wait_threads, atomic_read(&DaemonCount)); - Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/