Hi,<br> I think santosh is talking about user land IPC (semget). thread/process which has acquired a sema lock/sem down using semop(2) syscall. <br><br><br><br>Thanks,<br>Rajath<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 3:54 PM, Kristof Provost <span dir="ltr"><<a href="mailto:kristof@sigsegv.be">kristof@sigsegv.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2012-02-24 12:15:03 (+0200), Kosta Zertsekel <<a href="mailto:zertsekel@gmail.com">zertsekel@gmail.com</a>> wrote:<br>
> I think of user land program opening a socket and crashing on<br>
> segmentation fault.<br>
> In code 'socket' syscall does:<br>
> sock_map_fd --> sock_alloc_file --> alloc_file --> ... get lost ...<br>
> Where exactly in this case lock is held - I mean the lock that gets<br>
> released when user land process dies?<br>
<br>
</div>In this case there doesn't appear to be any lock. The sock_map_fd<br>
function is most probably called from the socket syscall. This call<br>
isn't locked. Multiple processes can be in the socket syscall at the<br>
same time.<br>
There certainly won't be a (kernel) lock which is held between two system<br>
calls.<br>
<br>
Regards,<br>
Kristof<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks & Regards,<br>Rajath N R<br>