From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks
Date: Fri, 20 Mar 2015 07:52:32 -0400 [thread overview]
Message-ID: <20150320115232.GA19057@laptop.bfoster> (raw)
In-Reply-To: <20150319235520.GG24608@birch.djwong.org>
On Thu, Mar 19, 2015 at 04:55:20PM -0700, Darrick J. Wong wrote:
> Clear the contents of the xfs buffer when we're initializing it to avoid
> writing random heap contents (and CRC thereof) to disk.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Looks good to me:
Reviewed-by: Brian Foster <bfoster@redhat.com>
> libxfs/rdwr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
> index 7d73477..35fb366 100644
> --- a/libxfs/rdwr.c
> +++ b/libxfs/rdwr.c
> @@ -411,6 +411,7 @@ __initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
> strerror(errno));
> exit(1);
> }
> + memset(bp->b_addr, 0, bytes);
> #ifdef XFS_BUF_TRACING
> list_head_init(&bp->b_lock_list);
> #endif
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-03-20 11:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 23:55 [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks Darrick J. Wong
2015-03-20 11:52 ` Brian Foster [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=20150320115232.GA19057@laptop.bfoster \
--to=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=xfs@oss.sgi.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