• Oleg Nesterov's avatar
    [PATCH] taskstats_tgid_free: fix usage · 093a8e8a
    Oleg Nesterov authored
    taskstats_tgid_free() is called on copy_process's error path. This is wrong.
    	IF (clone_flags & CLONE_THREAD)
    		We should not clear ->signal->taskstats, current uses it,
    		it probably has a valid accumulated info.
    		taskstats_tgid_init() set ->signal->taskstats = NULL,
    		there is nothing to free.
    Move the callsite to __exit_signal(). We don't need any locking, entire
    thread group is exiting, nobody should have a reference to soon to be
    released ->signal.
    Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
    Cc: Shailabh Nagar <nagar@watson.ibm.com>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: Jay Lan <jlan@sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
fork.c 42.2 KB