Bug 3277

Summary: raid0.c functions raid0_run() line 317: access invalid address
Product: IO/Storage Reporter: raid (naww)
Component: MDAssignee: Neil Brown (neilb)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.8.1 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Patch that will be submitted upstream

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