• Hendrik Brueckner's avatar
    s390/process: free vx save area when releasing tasks · 6a039eab
    Hendrik Brueckner authored
    If a task uses vector registers, a save area is allocated to save/restore
    register states.  Free the save area when releasing the task.
    
    Found the Memory leak with kmemleak:
    
    unreferenced object 0x72885e00 (size 512):
      comm "vx-test", pid 26123, jiffies 4294945635 (age 256.810s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 01 db 71 06 41  .............q.A
        00 00 00 00 00 00 00 00 24 f7 a9 a7 51 94 79 bb  ........$...Q.y.
      backtrace:
        [<00000000002d1c8a>] kmem_cache_alloc_trace+0x272/0x3d0
        [<00000000001014ac>] alloc_vector_registers+0x54/0x138
        [<00000000001017c8>] data_exception+0x158/0x1b0
        [<00000000008b551e>] pgm_check_handler+0x13e/0x180
        [<00000000800008b6>] 0x800008b6
    Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    6a039eab
process.c 6.91 KB