mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
osi-probe-avoid-out-of-range-memory-reads-20061006
FIXES 41858 avoid oops on opteron due to accessing unmapped memory
This commit is contained in:
parent
775ea6f1b7
commit
e39f4d8789
@ -1009,6 +1009,12 @@ static void *try(probectl *P, tryctl *T, PROBETYPE *aptr,
|
|||||||
#else
|
#else
|
||||||
ptr = aptr;
|
ptr = aptr;
|
||||||
#endif
|
#endif
|
||||||
|
if ((unsigned long)ptr < init_mm.start_code ||
|
||||||
|
(unsigned long)ptr > init_mm.end_data) {
|
||||||
|
/* printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ret = check_table(P, ptr);
|
ret = check_table(P, ptr);
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
/* return value is number of entries to skip */
|
/* return value is number of entries to skip */
|
||||||
@ -1113,6 +1119,11 @@ static void *try_harder(probectl *P, PROBETYPE *ptr, unsigned long datalen)
|
|||||||
printk("<7>osi_probe: %s try_harder\n", P->symbol);
|
printk("<7>osi_probe: %s try_harder\n", P->symbol);
|
||||||
#endif
|
#endif
|
||||||
for (offset = 0; offset < datalen; offset++, ptr++) {
|
for (offset = 0; offset < datalen; offset++, ptr++) {
|
||||||
|
if ((unsigned long)ptr < init_mm.start_code ||
|
||||||
|
(unsigned long)ptr > init_mm.end_data) {
|
||||||
|
/* printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ret = check_table(P, ptr);
|
ret = check_table(P, ptr);
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
/* return value is number of entries to skip */
|
/* return value is number of entries to skip */
|
||||||
|
Loading…
Reference in New Issue
Block a user