From: kristof@sigsegv.be (Kristof Provost)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Semaphore
Date: Fri, 24 Feb 2012 11:24:59 +0100 [thread overview]
Message-ID: <20120224102459.GS10865@thebe.jupiter.sigsegv.be> (raw)
In-Reply-To: <CADxo8W+V7Yvy38qb8itzyVdy6LDDGr_doHBNEQPJNvGuHkqc4A@mail.gmail.com>
On 2012-02-24 12:15:03 (+0200), Kosta Zertsekel <zertsekel@gmail.com> 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
next prev parent reply other threads:[~2012-02-24 10:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 13:47 Semaphore SaNtosh kuLkarni
2012-02-21 15:12 ` Semaphore Konstantin Zertsekel
2012-02-21 16:14 ` Semaphore Dave Hylands
2012-02-22 9:01 ` Semaphore Konstantin Zertsekel
2012-02-22 9:48 ` Semaphore Kristof Provost
2012-02-22 11:53 ` Semaphore Anuz Pratap Singh Tomar
2012-02-22 12:11 ` Semaphore Kristof Provost
2012-02-22 14:31 ` Semaphore Sri Ram Vemulpali
2012-02-23 6:12 ` Semaphore SaNtosh kuLkarni
2012-02-24 7:07 ` Semaphore Kosta Zertsekel
2012-02-24 9:04 ` Semaphore Kristof Provost
2012-02-24 9:25 ` Semaphore Kosta Zertsekel
2012-02-24 9:28 ` Semaphore Kristof Provost
2012-02-24 10:15 ` Semaphore Kosta Zertsekel
2012-02-24 10:24 ` Kristof Provost [this message]
2012-02-28 8:23 ` Semaphore Rajath N R
2012-02-28 8:33 ` Semaphore Rajath N R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120224102459.GS10865@thebe.jupiter.sigsegv.be \
--to=kristof@sigsegv.be \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).