|
|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
> > So then the code should just recognize that the "cpu" value > is beyond the architecture's maximum array index, report the > inconsistency, and "continue" on to the next map? > Well, that's more or less exactly what I did. See attached patch. /Per > Dave > > > -- > Crash-utility mailing list > Crash-utility@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/crash-utility
diff --git a/kernel.c b/kernel.c
index 4342bce..9e33e56 100755
--- a/kernel.c
+++ b/kernel.c
@@ -703,6 +703,11 @@ cpu_maps_init(void)
for (c = 0; c < BITS_PER_LONG; c++)
if (*maskptr & (0x1UL << c)) {
cpu = (i * BITS_PER_LONG) + c;
+ if (cpu >= NR_CPUS) {
+ error(WARNING, "Mask indicates too many %s cpus\n",
+ mapinfo[m].name);
+ break;
+ }
kt->cpu_flags[cpu] |= mapinfo[m].cpu_flag;
}
}
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility
[Home] [Fedora Legacy List] [Fedora Maintainers] [Fedora Desktop] [Red Hat 9 Bible] [Fedora Bible] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]
![]() |