From: Peter Zijlstra <peterz@infradead.org>
To: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>, Li Zefan <lizefan@huawei.com>,
linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [PATCH 1/1] sched/autogroup: Fix race with task_groups list
Date: Mon, 27 May 2013 11:03:38 +0200 [thread overview]
Message-ID: <20130527090338.GG2781@laptop> (raw)
In-Reply-To: <1369411669-46971-2-git-send-email-gerald.schaefer@de.ibm.com>
On Fri, May 24, 2013 at 06:07:49PM +0200, Gerald Schaefer wrote:
> In autogroup_create(), a tg is allocated and added to the task_groups
> list. If CONFIG_RT_GROUP_SCHED is set, this tg is then modified while on
> the list, without locking. This can race with someone walking the list,
> like __enable_runtime() during CPU unplug, and result in a use-after-free
> bug.
>
> To fix this, move sched_online_group(), which adds the tg to the list,
> to the end of the autogroup_create() function after the modification.
>
> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Ah indeed, nice catch. Thanks!
next prev parent reply other threads:[~2013-05-27 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 16:07 [PATCH 0/1] " Gerald Schaefer
2013-05-24 16:07 ` [PATCH 1/1] " Gerald Schaefer
2013-05-27 9:03 ` Peter Zijlstra [this message]
2013-05-28 13:05 ` [tip:sched/core] " tip-bot for Gerald Schaefer
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=20130527090338.GG2781@laptop \
--to=peterz@infradead.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=schwidefsky@de.ibm.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
Powered by JetHome