Re: [PATCH] sched/numa: Fix use-after-free bug in the task_numa_compare

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

 



On Mon, Jan 18, 2016 at 09:59:08PM +0800, gavin.guo@xxxxxxxxxxxxx wrote:
> BugLink: https://bugs.launchpad.net/bugs/1527643

These do not go in patches..

>  	/*
> +	 * No need to move the exiting task or idle task.
>  	 */
>  	if ((cur->flags & PF_EXITING) || is_idle_task(cur))
>  		cur = NULL;
> +	else
> +		/*
> +		 * The task_struct must be protected here to protect the
> +		 * p->numa_faults access in the task_weight since the
> +		 * numa_faults could already be freed in the following path:
> +		 * finish_task_switch()
> +		 *     --> put_task_struct()
> +		 *         --> __put_task_struct()
> +		 *             --> task_numa_free()
> +		 */
> +		get_task_struct(cur);
> +

This is incorrect CodingStyle, please add { }.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]