IRQ_MATRIX_SIZE is the number of longs needed for a bitmap, multiplied by the size of a long, yielding a byte count. But it is used to size an array of longs, which is way more memory than is needed. Change IRQ_MATRIX_SIZE so it is just the number of longs needed and the arrays come out the correct size.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -8,7 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <linux/cpu.h> |
| 9 | 9 | #include <linux/irq.h> |
| 10 | 10 | |
| 11 | −#define IRQ_MATRIX_SIZE (BITS_TO_LONGS(IRQ_MATRIX_BITS) * sizeof(unsigned long)) | |
| 11 | +#define IRQ_MATRIX_SIZE (BITS_TO_LONGS(IRQ_MATRIX_BITS)) | |
| 12 | 12 | |
| 13 | 13 | struct cpumap { |
| 14 | 14 | unsigned int available; |