• Christian Borntraeger's avatar
    s390/smp: fix false positive kmemleak of mcesa data structure · 9cf8edb7
    Christian Borntraeger authored
    I get number of CPUs - 1 kmemleak hits like
    
    unreferenced object 0x37ec6f000 (size 1024):
      comm "swapper/0", pid 1, jiffies 4294937330 (age 889.690s)
      hex dump (first 32 bytes):
        6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
        6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      backtrace:
        [<000000000034a848>] kmem_cache_alloc+0x2b8/0x3d0
        [<00000000001164de>] __cpu_up+0x456/0x488
        [<000000000016f60c>] bringup_cpu+0x4c/0xd0
        [<000000000016d5d2>] cpuhp_invoke_callback+0xe2/0x9e8
        [<000000000016f3c6>] cpuhp_up_callbacks+0x5e/0x110
        [<000000000016f988>] _cpu_up+0xe0/0x158
        [<000000000016faf0>] do_cpu_up+0xf0/0x110
        [<0000000000dae1ee>] smp_init+0x126/0x130
        [<0000000000d9bd04>] kernel_init_freeable+0x174/0x2e0
        [<000000000089fc62>] kernel_init+0x2a/0x148
        [<00000000008adce2>] kernel_thread_starter+0x6/0xc
        [<00000000008adcdc>] kernel_thread_starter+0x0/0xc
        [<ffffffffffffffff>] 0xffffffffffffffff
    
    The pointer of this data structure is stored in the prefix page of that
    CPU together with some extra bits ORed into the the low bits.
    Mark the data structure as non-leak.
    Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    9cf8edb7
smp.c 30.6 KB