| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 19 Mar 2015 16:55:20 -0700 |
| Cc: | Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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>
---
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] libxfs: don't write uninitialized heap contents into new directory blocks, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur, Dave Chinner |
| Previous by Thread: | xfs write performance issue, Hans-Peter Jansen |
| Next by Thread: | Re: [PATCH v2] libxfs: don't write uninitialized heap contents into new directory blocks, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |