|
[PATCH] md - 1 of 3 - md/linear oops fix: msg#00130linux.raid
Three patches for md/raid in 2.5.latest.... ### Comments for ChangeSet From: Daniel McNeil <daniel@xxxxxxxx> This fixes an oops caused by incorrect usage of sector_div() in which_dev() in md/linear.c. It was dereferencing an non-existent hash table entry. ----------- Diffstat output ------------ ./drivers/md/linear.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) diff ./drivers/md/linear.c~current~ ./drivers/md/linear.c --- ./drivers/md/linear.c~current~ 2003-03-26 09:44:40.000000000 +1100 +++ ./drivers/md/linear.c 2003-03-26 09:44:40.000000000 +1100 @@ -37,7 +37,11 @@ static inline dev_info_t *which_dev(mdde linear_conf_t *conf = mddev_to_conf(mddev); sector_t block = sector >> 1; - hash = conf->hash_table + sector_div(block, conf->smallest->size); + /* + * sector_div(a,b) returns the remainer and sets a to a/b + */ + (void)sector_div(block, conf->smallest->size); + hash = conf->hash_table + block; if ((sector>>1) >= (hash->dev0->size + hash->dev0->offset)) return hash->dev1; - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [PATCH] md - 2 of 3 - Cleanup #define TEXT text ... printk(TEXT): 00130, NeilBrown |
|---|---|
| Next by Date: | [PATCH] md - 3 of 3 - Convert md personalities to new module interface: 00130, NeilBrown |
| Previous by Thread: | [PATCH] md - 2 of 3 - Cleanup #define TEXT text ... printk(TEXT)i: 00130, NeilBrown |
| Next by Thread: | [PATCH] md - 3 of 3 - Convert md personalities to new module interface: 00130, NeilBrown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |