From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Michal Hocko <mhocko@suse.com>,
syzbot <syzbot+5a170e19c963a2e0df79@syzkaller.appspotmail.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com, linux-mm <linux-mm@kvack.org>,
Dmitry Vyukov <dvyukov@google.com>
Subject: Re: WARNING in kill_block_super
Date: Wed, 11 Apr 2018 01:59:38 +0100 [thread overview]
Message-ID: <20180411005938.GN30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <6c95e826-4b9f-fb21-b311-830411e58480@I-love.SAKURA.ne.jp>
On Wed, Apr 04, 2018 at 07:53:07PM +0900, Tetsuo Handa wrote:
> Al and Michal, are you OK with this patch?
First of all, it does *NOT* fix the problems with careless ->kill_sb().
The fuse-blk case is the only real rationale so far. Said that,
> @@ -166,6 +166,7 @@ static void destroy_unused_super(struct super_block *s)
> security_sb_free(s);
> put_user_ns(s->s_user_ns);
> kfree(s->s_subtype);
> + kfree(s->s_shrink.nr_deferred);
is probably better done with an inlined helper (fs/super.c has no business knowing
about ->nr_deferred name, and there probably will be other users of that
preallocation of yours). And the same helper would be better off zeroing the
pointer, same as unregister_shrinker() does.
> -int register_shrinker(struct shrinker *shrinker)
> +int prepare_shrinker(struct shrinker *shrinker)
preallocate_shrinker(), perhaps?
> +int register_shrinker(struct shrinker *shrinker)
> +{
> + int err = prepare_shrinker(shrinker);
> +
> + if (err)
> + return err;
> + register_shrinker_prepared(shrinker);
if (!err)
register_....;
return err;
would be better, IMO.
next prev parent reply other threads:[~2018-04-11 0:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 23:01 WARNING in kill_block_super syzbot
2018-04-04 10:53 ` Tetsuo Handa
2018-04-06 8:09 ` Michal Hocko
2018-04-07 5:55 ` Tetsuo Handa
2018-04-11 0:59 ` Al Viro [this message]
2018-04-11 1:28 ` Tetsuo Handa
2018-04-11 1:38 ` Al Viro
2018-04-11 10:09 ` Tetsuo Handa
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=20180411005938.GN30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dvyukov@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=syzbot+5a170e19c963a2e0df79@syzkaller.appspotmail.com \
--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 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).