frv: Use correct size for task_struct allocation
authorThomas Gleixner <tglx@linutronix.de>
Thu, 3 May 2012 09:02:47 +0000 (09:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Aug 2013 15:26:28 +0000 (08:26 -0700)
commit0a2436eff9888b8fff8b7a5cf6bae49826615a7e
treee6001f3b0b82738e54aaf7c1f89a128465bcb730
parenta42efb79d54d9a13c8f68df122c832bca08b74ae
frv: Use correct size for task_struct allocation

commit cce4517f33384c3794c759e206cc8e1bb6df146b upstream.

alloc_task_struct_node() allocates THREAD_SIZE and maintains some
weird refcount in the allocated memory. This never blew up as
task_struct size on 32bit machines was always less than THREAD_SIZE

Allocate just sizeof(struct task_struct) and get rid of the magic
refcounting.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120503085033.898475542@linutronix.de
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/frv/kernel/process.c