All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho.jeong@samsung.com>
To: edumazet@google.com, mguzik@redhat.com, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org
Cc: Daeho Jeong <daeho.jeong@samsung.com>
Subject: [PATCH] fs: initialize resize_wait wait queue of init task
Date: Tue, 16 May 2017 15:40:32 +0900	[thread overview]
Message-ID: <1494916832-9732-1-git-send-email-daeho.jeong@samsung.com> (raw)
In-Reply-To: CGME20170516064030epcas1p238af57ce4223442c821948621897d780@epcas1p2.samsung.com

We don't initialize resize_wait of init task now and all the kernel
threads share this uninitialized resize_wait wait queue because they
are sharing the file table of init task. Therefore, when expanding
this file table shared by the kernel threads, we encounter kernel panic
by accessing the NULL resize_wait wait queue.

Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
Tested-by: Youngjin Gil <youngjin.gil@samsung.com>
---
 fs/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/file.c b/fs/file.c
index ad6f094f2eff..74748c32e07a 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -475,6 +475,7 @@ struct files_struct init_files = {
 		.full_fds_bits	= init_files.full_fds_bits_init,
 	},
 	.file_lock	= __SPIN_LOCK_UNLOCKED(init_files.file_lock),
+	.resize_wait	= __WAIT_QUEUE_HEAD_INITIALIZER(init_files.resize_wait),
 };
 
 static unsigned int find_next_fd(struct fdtable *fdt, unsigned int start)
-- 
2.11.0

       reply	other threads:[~2017-05-16  6:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170516064030epcas1p238af57ce4223442c821948621897d780@epcas1p2.samsung.com>
2017-05-16  6:40 ` Daeho Jeong [this message]
2017-05-16 14:10   ` [PATCH] fs: initialize resize_wait wait queue of init task Eric Dumazet
     [not found]   ` <CGME20170516064030epcas1p238af57ce4223442c821948621897d780@epcms1p3>
2017-05-17  0:25     ` Daeho Jeong
2017-05-17  1:47       ` Al Viro
     [not found]       ` <CGME20170516064030epcas1p238af57ce4223442c821948621897d780@epcms1p8>
2017-05-17  1:52         ` Daeho Jeong
     [not found] <CGME20170614002719epcas5p3882aceef116f53781449010cc13f55e5@epcas5p3.samsung.com>
2017-06-14  0:27 ` Daeho Jeong
2017-06-15 11:16   ` Al Viro

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=1494916832-9732-1-git-send-email-daeho.jeong@samsung.com \
    --to=daeho.jeong@samsung.com \
    --cc=edumazet@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mguzik@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.