| To: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks |
| From: | Brian Foster <bfoster@xxxxxxxxxx> |
| Date: | Fri, 20 Mar 2015 07:52:32 -0400 |
| Cc: | Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20150319235520.GG24608@xxxxxxxxxxxxxxxx> |
| References: | <20150319235520.GG24608@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.23 (2014-03-12) |
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@xxxxxxxxxx> > --- Looks good to me: Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx> > 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@xxxxxxxxxxx > http://oss.sgi.com/mailman/listinfo/xfs |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur, Mel Gorman |
|---|---|
| Next by Date: | Re: [PATCH v3 3/3] NFSD: Add support for encoding multiple segments, J. Bruce Fields |
| Previous by Thread: | [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks, Darrick J. Wong |
| Next by Thread: | Re: [PATCH v3 3/3] NFSD: Add support for encoding multiple segments, J. Bruce Fields |
| Indexes: | [Date] [Thread] [Top] [All Lists] |