From: youfeng Date: Fri, 7 Nov 2003 08:17:27 +0000 (+0000) Subject: fix the malform error in kernel_patches/patches/kernel_text_address-2.4.20-vanilla... X-Git-Tag: v1_7_0_51~2^7~293 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2f8c99927937f6c65e14f59c1ce5249879aec2c3;p=fs%2Flustre-release.git fix the malform error in kernel_patches/patches/kernel_text_address-2.4.20-vanilla.patch of my previous patch for b_2075 --- diff --git a/lustre/kernel_patches/patches/kernel_text_address-2.4.20-vanilla.patch b/lustre/kernel_patches/patches/kernel_text_address-2.4.20-vanilla.patch index 99004c1..14767592 100644 --- a/lustre/kernel_patches/patches/kernel_text_address-2.4.20-vanilla.patch +++ b/lustre/kernel_patches/patches/kernel_text_address-2.4.20-vanilla.patch @@ -1,52 +1,51 @@ Index: linux-2.4.20/arch/um/kernel/Makefile =================================================================== ---- linux-2.4.20.orig/arch/um/kernel/Makefile 2003-10-30 11:31:21.000000000 +0800 -+++ linux-2.4.20/arch/um/kernel/Makefile 2003-10-30 11:35:28.000000000 +0800 +--- linux-2.4.20.orig/arch/um/kernel/Makefile 2003-11-07 15:54:41.000000000 +0800 ++++ linux-2.4.20/arch/um/kernel/Makefile 2003-11-07 15:57:08.000000000 +0800 @@ -37,7 +37,8 @@ export-objs-$(CONFIG_GPROF) += gprof_syms.o export-objs-$(CONFIG_GCOV) += gmon_syms.o -export-objs = ksyms.o process_kern.o signal_kern.o user_syms.o $(export-objs-y) +export-objs = ksyms.o process_kern.o signal_kern.o user_syms.o sysrq.o \ -+ $(export-objs-y) ++ $(export-objs-y) CFLAGS_user_syms.o = -D__AUTOCONF_INCLUDED__ $(DMODULES-y) $(DMODVERSIONS-y) \ -I/usr/include -I../include Index: linux-2.4.20/arch/um/kernel/sysrq.c =================================================================== ---- linux-2.4.20.orig/arch/um/kernel/sysrq.c 2003-10-30 11:31:22.000000000 +0800 -+++ linux-2.4.20/arch/um/kernel/sysrq.c 2003-10-30 11:37:36.000000000 +0800 -@@ -86,6 +86,40 @@ +--- linux-2.4.20.orig/arch/um/kernel/sysrq.c 2003-11-07 15:54:41.000000000 +0800 ++++ linux-2.4.20/arch/um/kernel/sysrq.c 2003-11-07 16:02:48.000000000 +0800 +@@ -86,6 +86,37 @@ show_trace((unsigned long *)esp); } - -+#ifdef CONFIG_MODULES + ++#ifdef CONFIG_MODULES +extern struct module *module_list; +extern struct module kernel_module; +#endif + +int is_kernel_text_address(unsigned long addr) +{ -+ int retval = 0; ++ int retval = 0; +#ifdef CONFIG_MODULES -+ struct module *mod; ++ struct module *mod; +#endif + if (addr >= (unsigned long) &_stext && -+ addr <= (unsigned long) &_etext); -+ return 1; ++ addr <= (unsigned long) &_etext) ++ return 1; + +#ifdef CONFIG_MODULES -+ for (mod = module_list; mod != &kernel_module; mod = mod->next) { -+ /* mod_bound tests for addr being inside the vmalloc'ed -+ * module area. Of course it'd be better to test only -+ * for the .text subset... */ -+ if (mod_bound(addr, 0, mod)) { -+ retval = 1; -+ break; -+ } -+ } ++ for (mod = module_list; mod != &kernel_module; mod = mod->next) { ++ /* mod_bound tests for addr being inside the vmalloc'ed ++ * module area. Of course it'd be better to test only ++ * for the .text subset... */ ++ if (mod_bound(addr, 0, mod)) { ++ retval = 1; ++ break; ++ } ++ } +#endif -+ + return retval; +} +