linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* keeping the socket open in the kernel
@ 2001-11-05 21:45 Etay Meiri
  0 siblings, 0 replies; only message in thread
From: Etay Meiri @ 2001-11-05 21:45 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,

Consider the following scenario:
A daemon is waiting on accept() on a socket in the user space.
It receives a new connection and sends the socket descriptor down
to a module waiting for it in the kernel using ioctl().
The module gets the socket behind the descriptor using fget()
and socki_lookup() on the inode.
The module spawns a kernel thread that now reads from that socket.

Everything is working great even if the daemon now closes the new socket.
The session remains open and there is data transfer.

The problem is that if the deamon dies for whatever reason, the kernel thread
returns from the read with ERESTARTSYS and the socket can no longer be used.
I tried several things including raising the count on the inode and the file
structure. Nothing helped. I'de like my module to continue functioning even
after the daemon dies.

I'de appreciate any ideas.

TIA

-- 
************************************************
"When in doubt, use brute force."
									Ken Thompson
Etay Meiri
cl1@netvision.net.il
************************************************

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-05 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 21:45 keeping the socket open in the kernel Etay Meiri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).