diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index c927a549db2c..9bbb9c841e48 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -582,9 +582,6 @@ static int static_obj(void *obj) | |||
582 | unsigned long start = (unsigned long) &_stext, | 582 | unsigned long start = (unsigned long) &_stext, |
583 | end = (unsigned long) &_end, | 583 | end = (unsigned long) &_end, |
584 | addr = (unsigned long) obj; | 584 | addr = (unsigned long) obj; |
585 | #ifdef CONFIG_SMP | ||
586 | int i; | ||
587 | #endif | ||
588 | 585 | ||
589 | /* | 586 | /* |
590 | * static variable? | 587 | * static variable? |
@@ -595,24 +592,16 @@ static int static_obj(void *obj) | |||
595 | if (arch_is_kernel_data(addr)) | 592 | if (arch_is_kernel_data(addr)) |
596 | return 1; | 593 | return 1; |
597 | 594 | ||
598 | #ifdef CONFIG_SMP | ||
599 | /* | 595 | /* |
600 | * percpu var? | 596 | * in-kernel percpu var? |
601 | */ | 597 | */ |
602 | for_each_possible_cpu(i) { | 598 | if (is_kernel_percpu_address(addr)) |
603 | start = (unsigned long) &__per_cpu_start + per_cpu_offset(i); | 599 | return 1; |
604 | end = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM | ||
605 | + per_cpu_offset(i); | ||
606 | |||
607 | if ((addr >= start) && (addr < end)) | ||
608 | return 1; | ||
609 | } | ||
610 | #endif | ||
611 | 600 | ||
612 | /* | 601 | /* |
613 | * module var? | 602 | * module static or percpu var? |
614 | */ | 603 | */ |
615 | return is_module_address(addr); | 604 | return is_module_address(addr) || is_module_percpu_address(addr); |
616 | } | 605 | } |
617 | 606 | ||
618 | /* | 607 | /* |