projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72ff13b
)
md: avoid use of broken kzalloc mempool
author
Sage Weil
<
[email protected]
>
Tue, 22 Sep 2009 00:02:55 +0000
(17:02 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 22 Sep 2009 14:17:35 +0000
(07:17 -0700)
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 <
[email protected]
>
Signed-off-by: Sage Weil <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/md/multipath.c
patch
|
blob
|
history
diff --git
a/drivers/md/multipath.c
b/drivers/md/multipath.c
index 89e76819f61f790ebca186d6b64a3d2b023fa5d7..d2d3fd54cc681184cab146bf90ddc000f3b706de 100644
(file)
--- 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_k
z
alloc_pool(NR_RESERVED_BUFS,
+ conf->pool = mempool_create_k
m
alloc_pool(NR_RESERVED_BUFS,
sizeof(struct multipath_bh));
if (conf->pool == NULL) {
printk(KERN_ERR