From mboxrd@z Thu Jan 1 00:00:00 1970 From: rajathnr@gmail.com (Rajath N R) Date: Tue, 28 Feb 2012 13:53:17 +0530 Subject: Semaphore In-Reply-To: <20120224102459.GS10865@thebe.jupiter.sigsegv.be> References: <20120222094844.GK10865@thebe.jupiter.sigsegv.be> <20120222121111.GM10865@thebe.jupiter.sigsegv.be> <20120224090436.GQ10865@thebe.jupiter.sigsegv.be> <20120224092852.GR10865@thebe.jupiter.sigsegv.be> <20120224102459.GS10865@thebe.jupiter.sigsegv.be> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, I think santosh is talking about user land IPC (semget). thread/process which has acquired a sema lock/sem down using semop(2) syscall. Thanks, Rajath On Fri, Feb 24, 2012 at 3:54 PM, Kristof Provost wrote: > On 2012-02-24 12:15:03 (+0200), Kosta Zertsekel > wrote: > > I think of user land program opening a socket and crashing on > > segmentation fault. > > In code 'socket' syscall does: > > sock_map_fd --> sock_alloc_file --> alloc_file --> ... get lost ... > > Where exactly in this case lock is held - I mean the lock that gets > > released when user land process dies? > > In this case there doesn't appear to be any lock. The sock_map_fd > function is most probably called from the socket syscall. This call > isn't locked. Multiple processes can be in the socket syscall at the > same time. > There certainly won't be a (kernel) lock which is held between two system > calls. > > Regards, > Kristof > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Thanks & Regards, Rajath N R -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120228/76eed4ab/attachment.html