From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <darrick.wong@oracle.com>,
Christoph Hellwig <hch@infradead.org>
Cc: 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:48:06 -0800 [thread overview]
Message-ID: <9f20b3b8-3598-059a-2c1e-18f803ebb178@sandeen.net> (raw)
In-Reply-To: <20200225182849.GI6740@magnolia>
On 2/25/20 10:28 AM, Darrick J. Wong wrote:
> 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. ;)
It struck me as odd as well, so despite my review I'll probably drop it,
given that there's no clear reason given to do this.
-Eric
next prev parent reply other threads:[~2020-02-25 18:48 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
2020-02-25 18:48 ` Eric Sandeen [this message]
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=9f20b3b8-3598-059a-2c1e-18f803ebb178@sandeen.net \
--to=sandeen@sandeen.net \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/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