Bug 12966

Summary: Overlapping data buffer
Product: Platform Specific/Hardware Reporter: Martin Ettl (ettl.martin)
Component: x86-64Assignee: Alexey Dobriyan (adobriyan)
Status: RESOLVED CODE_FIX    
Severity: normal CC: adobriyan, sankar.curiosity
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.29 Subsystem:
Regression: No Bisected commit-id:

Description Martin Ettl 2009-03-29 00:09:38 UTC
Hi,

i checked the sources with a static code analysis tool and found a few issues:

[linux-2.6.29/arch/x86/kernel/cpu/intel_cacheinfo.c:721]: (error) Overlapping data buffer buf
[linux-2.6.29/arch/x86/kernel/cpu/intel_cacheinfo.c:723]: (error) Overlapping data buffer buf
[linux-2.6.29/arch/x86/kernel/cpu/intel_cacheinfo.c:727]: (error) Overlapping data buffer buf


Line 721: ret += sprintf(buf, "%sEntry: %d\n", buf, i);
At line 723 and 727 the same issue happens!

Best regards

Ettl Martin
Comment 1 Sankar P 2009-05-12 10:03:51 UTC
I will look into this.
Comment 2 Alexey Dobriyan 2009-10-16 00:56:37 UTC
commit f8b201fc7110c3673437254e8ba02451461ece0b
"x86: cacheinfo: replace sysfs interface for cache_disable feature"