1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
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.
It's currently under investigation, whether this is gcc miscompiling
the RELOC_HIDE() magic, or a real kernel bug.
This patch avoids RELOC_HIDE() being used here, and makes the crash
during module handling go away for now. Temporary solution.
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()
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 */
|