patch-2.1.50 linux/mm/slab.c
Next file: linux/net/ipv4/tcp_ipv4.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Wed Aug 13 20:03:22 1997
- Orig file:
v2.1.49/linux/mm/slab.c
- Orig date:
Thu Jul 17 10:06:09 1997
diff -u --recursive --new-file v2.1.49/linux/mm/slab.c linux/mm/slab.c
@@ -1582,6 +1582,12 @@
} else
kmem_report_free_err("Bad obj addr", objp, cachep);
spin_unlock_irqrestore(&cachep->c_spinlock, save_flags);
+
+#if 1
+/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
+*(int *) 0 = 0;
+#endif
+
return;
null_addr:
kmem_report_free_err("NULL ptr", objp, cachep);
@@ -1624,7 +1630,7 @@
goto null_ptr;
nr = MAP_NR(objp);
if (nr >= max_mapnr)
- goto null_ptr;
+ goto bad_ptr;
/* Assume we own the page structure - hence no locking.
* If someone is misbehaving (eg. someone calling us with a bad
@@ -1647,8 +1653,15 @@
return;
}
}
-null_ptr:
+bad_ptr:
printk(KERN_ERR "kfree: Bad obj %p\n", objp);
+
+#if 1
+/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
+*(int *) 0 = 0;
+#endif
+
+null_ptr:
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov