All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho.jeong@samsung.com>
To: Eric Dumazet <edumazet@google.com>,
	Daeho Jeong <daeho.jeong@samsung.com>
Cc: "mguzik@redhat.com" <mguzik@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: RE: Re: [PATCH] fs: initialize resize_wait wait queue of init task
Date: Wed, 17 May 2017 00:25:19 +0000	[thread overview]
Message-ID: <20170517002519epcms1p31ef6730545cfb4652beab890a047805a@epcms1p3> (raw)
In-Reply-To: <CANn89iJkfLE_gLTG8mR49HBCHaz24WobEvvePGgFf0CdT7XCSA@mail.gmail.com>

> I am curious, what kind of kernel threads are using file table ?
> Thanks.

I don't know all the cases of that.
But, in the embedded world, a lot of device drivers or kernel daemons are
opening the files to just watch and read,
or to write some log data.

 

--------- Original Message ---------

Sender : Eric Dumazet <edumazet@google.com>

Date   : 2017-05-16 23:10 (GMT+9)

Title  : Re: [PATCH] fs: initialize resize_wait wait queue of init task

 

On Mon, May 15, 2017 at 11:40 PM, Daeho Jeong <daeho.jeong@samsung.com> wrote:

> 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

>

 

Acked-by: Eric Dumazet <edumazet@google.com>

Fixes: 8a81252b774b ("fs/file.c: don't acquire files->file_lock in

fd_install()")

 



 

 

  parent reply	other threads:[~2017-05-17  0:25 UTC|newest]

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

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=20170517002519epcms1p31ef6730545cfb4652beab890a047805a@epcms1p3 \
    --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.