From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: sandeen@sandeen.net, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] libxfs: zero the struct xfs_mount when unmounting the filesystem
Date: Tue, 25 Feb 2020 10:28:49 -0800 [thread overview]
Message-ID: <20200225182849.GI6740@magnolia> (raw)
In-Reply-To: <20200225174038.GE20570@infradead.org>
On Tue, Feb 25, 2020 at 09:40:38AM -0800, Christoph Hellwig wrote:
> On Mon, Feb 24, 2020 at 04:11:20PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Since libxfs doesn't allocate the struct xfs_mount *, we can't just free
> > it during unmount. Zero its contents to prevent any use-after-free.
>
> I don't really this at all. Seems to be cargo-cult style programming.
Admittedly I'm not convinced it's necessary either, seeing as we control
all the callers, and none of them actually screw this up. But I defer
to the maintainer. ;)
(If anything I'm more afraid of the "libxfs_xinit_t x;" but that's a
different cleanup for another time.)
--D
next prev parent reply other threads:[~2020-02-25 18:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 0:11 [PATCH 0/2] libxfs: minor cleanups of destructors Darrick J. Wong
2020-02-25 0:11 ` [PATCH 1/2] libxfs: zero the struct xfs_mount when unmounting the filesystem Darrick J. Wong
2020-02-25 5:57 ` Eric Sandeen
2020-02-25 15:08 ` Darrick J. Wong
2020-02-25 15:13 ` Brian Foster
2020-02-25 17:40 ` Christoph Hellwig
2020-02-25 18:28 ` Darrick J. Wong [this message]
2020-02-25 18:48 ` Eric Sandeen
2020-02-25 0:11 ` [PATCH 2/2] libxfs: clean up libxfs_destroy Darrick J. Wong
2020-02-25 6:00 ` Eric Sandeen
2020-02-25 15:13 ` Brian Foster
2020-02-25 17:41 ` Christoph Hellwig
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=20200225182849.GI6740@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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.