All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: axboe@kernel.dk, syzkaller-bugs@googlegroups.com,
	linux-block@vger.kernel.org
Subject: Re: [PATCH] loop: add recursion validation to LOOP_CHANGE_FD
Date: Mon, 7 May 2018 11:33:52 -0400	[thread overview]
Message-ID: <20180507153352.GB999@thunk.org> (raw)
In-Reply-To: <201805072221.AGH57860.MOSHJOtOQFLFFV@I-love.SAKURA.ne.jp>

On Mon, May 07, 2018 at 10:21:04PM +0900, Tetsuo Handa wrote:
> > I don't understand your concern; where are we going to out_putf when
> > error == 0?

Ah, now I see it, thanks.  I'll send a revised patch.

> By the way, are you aware that current "/* Avoid recursion */" loop is not thread safe?

Actually, it is safe.  While the child loop device has an open file on
the parent, lo_refcnt is elevated, which prevents loop_clr_fd from
actually set setting lo_state to Lo_rundown and clearing
lo_backing_file

						- Ted

  reply	other threads:[~2018-05-07 15:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04  2:17 [PATCH] loop: add recursion validation to LOOP_CHANGE_FD Theodore Ts'o
2018-05-07 11:16 ` Tetsuo Handa
2018-05-07 13:10   ` Theodore Y. Ts'o
2018-05-07 13:21     ` Tetsuo Handa
2018-05-07 15:33       ` Theodore Y. Ts'o [this message]
2018-05-07 15:37         ` [PATCH -v2] " Theodore Ts'o
2018-06-05 13:04           ` Tetsuo Handa
2018-06-05 14:51             ` Theodore Y. Ts'o
2018-06-05 15:07               ` Jens Axboe
2018-05-07 20:45         ` [PATCH] " Tetsuo Handa
2018-05-07 23:51           ` Theodore Y. Ts'o
2018-05-08  0:28             ` Tetsuo Handa
2018-05-08  3:56               ` Theodore Y. Ts'o
2018-05-08  4:23                 ` Tetsuo Handa
2018-05-09  8:49                 ` Dmitry Vyukov
2018-05-09 14:02                   ` Theodore Y. Ts'o
2018-05-14  7:41                     ` Dmitry Vyukov

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=20180507153352.GB999@thunk.org \
    --to=tytso@mit.edu \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=syzkaller-bugs@googlegroups.com \
    /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.