patch-2.4.22 linux-2.4.22/arch/ia64/mm/extable.c
Next file: linux-2.4.22/arch/ia64/mm/fault.c
Previous file: linux-2.4.22/arch/ia64/lib/swiotlb.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/ia64/mm/extable.c
- Orig date:
2002-08-02 17:39:42.000000000 -0700
diff -urN linux-2.4.21/arch/ia64/mm/extable.c linux-2.4.22/arch/ia64/mm/extable.c
@@ -38,6 +38,8 @@
register unsigned long main_gp __asm__("gp");
#endif
+extern spinlock_t modlist_lock;
+
struct exception_fixup
search_exception_table (unsigned long addr)
{
@@ -52,9 +54,11 @@
return fix;
#else
struct archdata *archdata;
+ unsigned long flags;
struct module *mp;
/* The kernel is the last "module" -- no need to treat it special. */
+ spin_lock_irqsave(&modlist_lock, flags);
for (mp = module_list; mp; mp = mp->next) {
if (!mp->ex_table_start)
continue;
@@ -65,9 +69,10 @@
addr, (unsigned long) archdata->gp);
if (entry) {
fix.cont = entry->cont + (unsigned long) archdata->gp;
- return fix;
+ break;
}
}
+ spin_unlock_irqrestore(&modlist_lock, flags);
#endif
return fix;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)