Faults in Linux Kernel 3.x : Allocating Large Arrays on Stack

As part of my work, I need to annotate  the reports generated using Coccinelle Scripts as bugs/FPs for recent Linux Kernels, recent as in versions > 3.0 till the current one 3.18.

So in reading the reports (newer ones) I have recently completed Linux_var.new.org.

Linux_var.new.org has reports where large arrays that are allocated on the stack.

The threshold was 1023. So anything below this is fine and can be changed to an False Positive. Anything greater than this is a clear bug.

I explained in this post, whey it is bad to use large size arrays allocated on stack.

There were many TODOs in the org file.

So what did I find?

I found that most were FPs. So, they have stopped doing this mistake as I found a lot of bugs in 2.6.x version. Most were in the test files, or user level files or in tools file, that is not gonna have any bad effect.

I found one bug, inside staging directory. It’s still present in current Linux Kernel.


#bugs, #coccinelle-scripts, #faults, #large-arrays, #linux-kernel, #linux-kernels