patch-2.3.27 linux/arch/ppc/mm/extable.c

Next file: linux/arch/ppc/mm/init.c
Previous file: linux/arch/ppc/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.26/linux/arch/ppc/mm/extable.c linux/arch/ppc/mm/extable.c
@@ -43,13 +43,18 @@
 #else
 	/* The kernel is the last "module" -- no need to treat it special.  */
 	struct module *mp;
+	read_lock(&modlist_lock);
 	for (mp = module_list; mp != NULL; mp = mp->next) {
 		if (mp->ex_table_start == NULL)
 			continue;
 		ret = search_one_table(mp->ex_table_start,
 				       mp->ex_table_end - 1, addr);
-		if (ret) return ret;
+		if (ret) {
+			read_unlock(&modlist_lock);
+			return ret;
+		}
 	}
+	read_unlock(&modlist_lock);
 #endif
 
 	return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)