From: Marko Rauhamaa <marko.rauhamaa@f-secure.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: fanotify: surprising chain reaction -> deadlock
Date: Wed, 27 Mar 2019 14:08:51 +0200 [thread overview]
Message-ID: <87wokkecz0.fsf@drapion.f-secure.com> (raw)
Just an observation of an fanotify complication...
We have just managed to analyze an interesting vicious circle
(simplified):
* disable IPv6 in the kernel
* start a file monitor
* during its initialization, the file monitor
1. marks file systems with OPEN_PERM
2. calls socket(PF_INET6)
* the kernel executes this piece of code (socket.c):
#ifdef CONFIG_MODULES
/* Attempt to load a protocol module if the find failed.
*
* 12/09/1996 Marcin: But! this makes REALLY only sense, if the user
* requested real, full-featured networking support upon configuration.
* Otherwise module support will break!
*/
if (rcu_access_pointer(net_families[family]) == NULL)
request_module("net-pf-%d", family);
#endif
* request_module spawns "modprobe" in the user space
* opening "modprobe" is blocked by OPEN_PERM; however, the file monitor
is still blocked in the socket(2) system call and can't release the
"modprobe" process
I'm not sure if there is a bug somewhere here but a surprising
interaction nonetheless.
Marko
next reply other threads:[~2019-03-27 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 12:08 Marko Rauhamaa [this message]
2019-03-29 14:40 ` fanotify: surprising chain reaction -> deadlock Jan Kara
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=87wokkecz0.fsf@drapion.f-secure.com \
--to=marko.rauhamaa@f-secure.com \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.