From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jiri Kosina <jkosina@suse.cz>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Davide Libenzi <davidel@xmailserver.org>,
Daniel Baluta <daniel.baluta@gmail.com>
Subject: linux-next: manual merge of the trivial tree with Linus' tree
Date: Mon, 28 Feb 2011 15:21:53 +1100 [thread overview]
Message-ID: <20110228152153.25e94457.sfr@canb.auug.org.au> (raw)
Hi Jiri,
Today's linux-next merge of the trivial tree got a conflict in
fs/eventpoll.c between commit 22bacca48a1755f79b7e0f192ddb9fbb7fc6e64e
("epoll: prevent creating circular epoll structures") from Linus' tree
and commit bf6a41db7726e6c09b9c6ac993457b7260473406 ("fs/eventpoll.c: fix
spelling") from the trivial tree.
Just context. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc fs/eventpoll.c
index 4a09af9,7513066..0000000
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@@ -62,14 -62,7 +62,14 @@@
* This mutex is acquired by ep_free() during the epoll file
* cleanup path and it is also acquired by eventpoll_release_file()
* if a file has been pushed inside an epoll set and it is then
- * close()d without a previous call toepoll_ctl(EPOLL_CTL_DEL).
+ * close()d without a previous call to epoll_ctl(EPOLL_CTL_DEL).
+ * It is also acquired when inserting an epoll fd onto another epoll
+ * fd. We do this so that we walk the epoll tree and ensure that this
+ * insertion does not create a cycle of epoll file descriptors, which
+ * could lead to deadlock. We need a global mutex to prevent two
+ * simultaneous inserts (A into B and B into A) from racing and
+ * constructing a cycle without either insert observing that it is
+ * going to.
* It is possible to drop the "ep->mtx" and to use the global
* mutex "epmutex" (together with "ep->lock") to have it working,
* but having "ep->mtx" will make the interface more scalable.
next reply other threads:[~2011-02-28 4:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 4:21 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-26 4:29 linux-next: manual merge of the trivial tree with Linus' tree Stephen Rothwell
2014-05-06 3:52 Stephen Rothwell
2013-12-24 2:49 Stephen Rothwell
2013-07-03 5:29 Stephen Rothwell
2012-06-29 4:36 Stephen Rothwell
2012-06-29 12:48 ` Jiri Kosina
2012-04-04 2:03 Stephen Rothwell
2012-03-29 1:48 Stephen Rothwell
2010-11-09 2:31 Stephen Rothwell
2010-11-15 12:40 ` Jiri Kosina
2010-08-10 2:11 Stephen Rothwell
2010-08-10 11:22 ` Jiri Kosina
2010-03-08 2:20 Stephen Rothwell
2010-03-08 2:41 ` Mulyadi Santosa
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=20110228152153.25e94457.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=daniel.baluta@gmail.com \
--cc=davidel@xmailserver.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.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).