linux/debian/patches/bugfix/all/revert-percpu-stable-change...

45 lines
1.5 KiB
Diff

From: Jiri Kosina <jkosina@suse.cz>
Subject: Revert module.c and module.h changes from -stable update
References: bnc#600364
This reverts two patches from 2.6.32.12 -stable update, as it causes
kernel crash on ia64.
The following two 2.6.32.12 -stable patches are reverted:
[169/197] modules: fix incorrect percpu usage
[171/197] module: fix __module_ref_addr()
They were incorrectly applied to 2.6.32-stable, though they should be applied
only to 2.6.33+ stable (on 2.6.32 ia64, static and dynamic percpu areas are
separate).
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Index: linux-2.6.32-SLE11-SP1/include/linux/module.h
===================================================================
--- linux-2.6.32-SLE11-SP1.orig/include/linux/module.h
+++ linux-2.6.32-SLE11-SP1/include/linux/module.h
@@ -459,7 +459,7 @@ void symbol_put_addr(void *addr);
static inline local_t *__module_ref_addr(struct module *mod, int cpu)
{
#ifdef CONFIG_SMP
- return (local_t *) per_cpu_ptr(mod->refptr, cpu);
+ return (local_t *) (mod->refptr + per_cpu_offset(cpu));
#else
return &mod->ref;
#endif
Index: linux-2.6.32-SLE11-SP1/kernel/module.c
===================================================================
--- linux-2.6.32-SLE11-SP1.orig/kernel/module.c
+++ linux-2.6.32-SLE11-SP1/kernel/module.c
@@ -572,7 +572,7 @@ static void percpu_modcopy(void *pcpudes
int cpu;
for_each_possible_cpu(cpu)
- memcpy(per_cpu_ptr(pcpudest, cpu), from, size);
+ memcpy(pcpudest + per_cpu_offset(cpu), from, size);
}
#else /* ... !CONFIG_SMP */