Bug 3277 - raid0.c functions raid0_run() line 317: access invalid address
Summary: raid0.c functions raid0_run() line 317: access invalid address
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: MD (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Neil Brown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-26 04:39 UTC by raid
Modified: 2007-09-24 17:59 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.8.1
Tree: Mainline
Regression: ---


Attachments
Patch that will be submitted upstream (1.47 KB, patch)
2007-09-24 17:59 UTC, Neil Brown
Details | Diff

Description raid 2004-08-26 04:39:35 UTC
Distribution:
Hardware Environment:
Software Environment:
Problem Description:
    raid0.c:functions raid0_run() line: 317 
    error: when cur > conf->nr_strip_zones
           (first zone is large, next some zones is small,
            so conf->hash_spaing is larger than the sum of next small zones),
           it would access an invalid address; 
    fixed: while(size <= conf->hash_spacing ) -->
           while(size <= conf->hash_spacing && cur < conf->nr_strip_zones -1) 

    type error: functions raid0_status() ,line 476: 
           lost word seq ; 
    fixed: 
           seq_printf("(h%d)",h++);  --->
           seq_printf(seq,"(h%d)",h++); 
Steps to reproduce:
Comment 1 Natalie Protasevich 2007-09-06 20:34:24 UTC
How is it working for you these days? Any better with new kernels?
Thanks.
Comment 2 Neil Brown 2007-09-24 17:56:14 UTC
The first problem was fixed by making the enclosing loop iterate once less often
(it starts i=1 instead of i=0).
The second is error is still present in the code but as the code is in an #ifdef that is never selected, it isn't a problem in practice.  Nevertheless I will
submit a patch to fix it.
Comment 3 Neil Brown 2007-09-24 17:59:19 UTC
Created attachment 12921 [details]
Patch that will be submitted upstream

Note You need to log in before you can comment on or make changes to this bug.