diff options
author | Sage Weil <sage@newdream.net> | 2009-09-21 17:02:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 07:17:35 -0700 |
commit | bbba809e96539672f775a3d70102657d05816a5b (patch) | |
tree | 6cd9f7b028316f50fa3a06d78cb11ee982c3d09b /drivers/md/multipath.c | |
parent | 72ff13b7036bc7923e0f2b5f4a724ca260d49aab (diff) | |
download | linux-bbba809e96539672f775a3d70102657d05816a5b.tar.gz linux-bbba809e96539672f775a3d70102657d05816a5b.tar.bz2 linux-bbba809e96539672f775a3d70102657d05816a5b.zip |
md: avoid use of broken kzalloc mempool
The kzalloc mempool does not re-zero items that have been used and then
returned to the pool. Manually zero the allocated multipath_bh instead.
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 89e76819f61f..d2d3fd54cc68 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -150,6 +150,7 @@ static int multipath_make_request (struct request_queue *q, struct bio * bio) } mp_bh = mempool_alloc(conf->pool, GFP_NOIO); + memset(mp_bh, 0, sizeof(*mp_bh)); mp_bh->master_bio = bio; mp_bh->mddev = mddev; @@ -493,7 +494,7 @@ static int multipath_run (mddev_t *mddev) } mddev->degraded = conf->raid_disks - conf->working_disks; - conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, + conf->pool = mempool_create_kmalloc_pool(NR_RESERVED_BUFS, sizeof(struct multipath_bh)); if (conf->pool == NULL) { printk(KERN_ERR |