diff options
author | Mark Tinguely <tinguely@sgi.com> | 2012-09-20 14:16:45 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-11-08 12:08:10 -0500 |
commit | 408cc4e97a3ccd172d2d676e4b585badf439271b (patch) | |
tree | 0ccc0a1f8c9873ea07a0fce00fa408322e8c1302 /fs | |
parent | 7e9620f21d8c9e389fd6845487e07d5df898a2e4 (diff) |
xfs: zero allocation_args on the kernel stack
Zero the kernel stack space that makes up the xfs_alloc_arg structures.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 4f33c32affe3..0287f3b1b503 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -1866,6 +1866,7 @@ xfs_alloc_fix_freelist( | |||
1866 | /* | 1866 | /* |
1867 | * Initialize the args structure. | 1867 | * Initialize the args structure. |
1868 | */ | 1868 | */ |
1869 | memset(&targs, 0, sizeof(targs)); | ||
1869 | targs.tp = tp; | 1870 | targs.tp = tp; |
1870 | targs.mp = mp; | 1871 | targs.mp = mp; |
1871 | targs.agbp = agbp; | 1872 | targs.agbp = agbp; |
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 848ffa77707b..e1545ec2f7d2 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -2437,6 +2437,7 @@ xfs_bmap_btalloc( | |||
2437 | * Normal allocation, done through xfs_alloc_vextent. | 2437 | * Normal allocation, done through xfs_alloc_vextent. |
2438 | */ | 2438 | */ |
2439 | tryagain = isaligned = 0; | 2439 | tryagain = isaligned = 0; |
2440 | memset(&args, 0, sizeof(args)); | ||
2440 | args.tp = ap->tp; | 2441 | args.tp = ap->tp; |
2441 | args.mp = mp; | 2442 | args.mp = mp; |
2442 | args.fsbno = ap->blkno; | 2443 | args.fsbno = ap->blkno; |
@@ -3082,6 +3083,7 @@ xfs_bmap_extents_to_btree( | |||
3082 | * Convert to a btree with two levels, one record in root. | 3083 | * Convert to a btree with two levels, one record in root. |
3083 | */ | 3084 | */ |
3084 | XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_BTREE); | 3085 | XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_BTREE); |
3086 | memset(&args, 0, sizeof(args)); | ||
3085 | args.tp = tp; | 3087 | args.tp = tp; |
3086 | args.mp = mp; | 3088 | args.mp = mp; |
3087 | args.firstblock = *firstblock; | 3089 | args.firstblock = *firstblock; |
@@ -3237,6 +3239,7 @@ xfs_bmap_local_to_extents( | |||
3237 | xfs_buf_t *bp; /* buffer for extent block */ | 3239 | xfs_buf_t *bp; /* buffer for extent block */ |
3238 | xfs_bmbt_rec_host_t *ep;/* extent record pointer */ | 3240 | xfs_bmbt_rec_host_t *ep;/* extent record pointer */ |
3239 | 3241 | ||
3242 | memset(&args, 0, sizeof(args)); | ||
3240 | args.tp = tp; | 3243 | args.tp = tp; |
3241 | args.mp = ip->i_mount; | 3244 | args.mp = ip->i_mount; |
3242 | args.firstblock = *firstblock; | 3245 | args.firstblock = *firstblock; |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 445bf1aef31c..c5c4ef4f2bdb 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -250,6 +250,7 @@ xfs_ialloc_ag_alloc( | |||
250 | /* boundary */ | 250 | /* boundary */ |
251 | struct xfs_perag *pag; | 251 | struct xfs_perag *pag; |
252 | 252 | ||
253 | memset(&args, 0, sizeof(args)); | ||
253 | args.tp = tp; | 254 | args.tp = tp; |
254 | args.mp = tp->t_mountp; | 255 | args.mp = tp->t_mountp; |
255 | 256 | ||