Bug 10121
Summary: | __you_cannot_kmalloc_that_much in hiddev.c with gcc 3.2 | ||
---|---|---|---|
Product: | Memory Management | Reporter: | Alexander (pikachu) |
Component: | Slab Allocator | Assignee: | Christoph Lameter (clameter) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | bunk, jdelvare, mpm, penberg |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.24.3 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
.config
Proposed fix |
Description
Alexander
2008-02-27 06:57:22 UTC
Please attach your .config Created attachment 15050 [details]
.config
Created attachment 15099 [details]
Proposed fix
The trick is to move the handling of ioctls which need to allocate memory to separate functions. This fixes the problem for me, but needs some testing.
Right. We know that gcc 3.2 will fold constants again if the functions are smaller. That has also addressed the issue in other cases. That also means that the issue will resurface if the function is bloated by further updates. The alternative would be to move the minimum supported compiler version from 3.2 to 3.3 if this reoccuring issue (see e.g. #9669) convinces Linus of accepting a patch doing so. I don't think that we want to make gcc 3.3 the minimum supported compiler version. gcc 3.2 still has a significant pool of users. On top of that, overly large functions are bad anyway for many reasons, so I doubt that you will convince Linus: he might see this gcc 3.2 property as a feature not bug ;) fixed by commit cf2a299e48cbeb6c942e1f765b92ca6058355f68 |