linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: gavin.guo@canonical.com
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	jay.vosburgh@canonical.com, liang.chen@canonical.com,
	mgorman@suse.de, mingo@redhat.com, riel@redhat.com
Subject: Re: [PATCH] sched/numa: Fix use-after-free bug in the task_numa_compare
Date: Mon, 18 Jan 2016 15:33:45 +0100	[thread overview]
Message-ID: <20160118143345.GQ6357@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1453125548-2762-1-git-send-email-gavin.guo@canonical.com>

On Mon, Jan 18, 2016 at 09:59:08PM +0800, gavin.guo@canonical.com 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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2016-01-18 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 13:59 gavin.guo
2016-01-18 14:03 ` Rik van Riel
2016-01-18 14:33 ` Peter Zijlstra [this message]
2016-01-18 15:24   ` [PATCH V2] " gavin.guo
2016-01-18 17:13     ` Peter Zijlstra
2016-01-18 23:40       ` Gavin Guo
2016-01-19  9:35         ` Ingo Molnar
2016-01-20  4:36           ` [PATCH V3] " gavin.guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160118143345.GQ6357@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=gavin.guo@canonical.com \
    --cc=jay.vosburgh@canonical.com \
    --cc=liang.chen@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox