From: Christian Brauner <brauner@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Todd Kjos" <tkjos@android.com>,
linux-kernel@vger.kernel.org, "Al Viro" <viro@zeniv.linux.org.uk>,
"Arve Hjønnevåg" <arve@android.com>,
"Martijn Coenen" <maco@android.com>,
"Joel Fernandes" <joel@joelfernandes.org>,
"Carlos Llamas" <cmllamas@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
"Kees Cook" <keescook@chromium.org>,
"Dongliang Mu" <mudongliangabcd@gmail.com>,
syzkaller <syzkaller@googlegroups.com>
Subject: Re: [PATCH v2] binderfs: rework superblock destruction
Date: Tue, 23 Aug 2022 12:57:36 +0200 [thread overview]
Message-ID: <20220823105736.l2g7jnt64eki6iro@wittgenstein> (raw)
In-Reply-To: <YwSvxrA6efdt9Gix@kroah.com>
On Tue, Aug 23, 2022 at 12:45:26PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Aug 23, 2022 at 11:53:39AM +0200, Christian Brauner wrote:
> > From: Al Viro <viro@zeniv.linux.org.uk>
> >
> > So far we relied on
> > .put_super = binderfs_put_super()
> > to destroy info we stashed in sb->s_fs_info. This gave us the required ordering
> > between ->evict_inode() and sb->s_fs_info destruction.
> >
> > But the current implementation of binderfs_fill_super() has a memory leak in
> > the rare circumstance that d_make_root() fails because ->put_super() is only
> > called when sb->s_root is initialized. Fix this by removing ->put_super() and
> > simply do all that work in binderfs_kill_super().
> >
> > Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
> > ---
> > drivers/android/binderfs.c | 30 +++++++++++++++++-------------
> > 1 file changed, 17 insertions(+), 13 deletions(-)
>
> What changed from v1?
Ah, forgot to add:
/* v2 */
Christian Brauner (Microsoft) <brauner@kernel.org>:
- Call kill_litter_super() before sb->s_fs_info cleanup.
prev parent reply other threads:[~2022-08-23 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 9:53 Christian Brauner
2022-08-23 10:45 ` Greg Kroah-Hartman
2022-08-23 10:57 ` Christian Brauner [this message]
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=20220823105736.l2g7jnt64eki6iro@wittgenstein \
--to=brauner@kernel.org \
--cc=arve@android.com \
--cc=cmllamas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel@joelfernandes.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=mudongliangabcd@gmail.com \
--cc=surenb@google.com \
--cc=syzkaller@googlegroups.com \
--cc=tkjos@android.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®