s390/process: free vx save area when releasing tasks
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Mon, 9 Feb 2015 15:47:00 +0000 (16:47 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 Feb 2015 15:39:05 +0000 (16:39 +0100)
commit6a039eab53c01a58bfff95c78fc800ca7de27c77
tree5b5cc1f503f91db9aaf9b8c1907567e722313e79
parenta178220df3a55c3ec46c2c2f0788a377acdb79c3
s390/process: free vx save area when releasing tasks

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: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/process.c