Re: [PATCH 3/6] taskstats_tgid_free: fix usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oleg Nesterov wrote:
> 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.
> 	ELSE
> 		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: Oleg Nesterov <[email protected]>

Looks good!
Acked-by: Balbir Singh <[email protected]>

---

	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux