From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbZLIId6 (ORCPT ); Wed, 9 Dec 2009 03:33:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751873AbZLIId5 (ORCPT ); Wed, 9 Dec 2009 03:33:57 -0500 Received: from casper.infradead.org ([85.118.1.10]:50866 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbZLIId4 (ORCPT ); Wed, 9 Dec 2009 03:33:56 -0500 Subject: Re: [patch V2 sched: Protect sched_rr_get_param access to task->sched_class From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , Ingo Molnar In-Reply-To: References: <20091208202026.804386447@linutronix.de> <1260345648.5489.65.camel@laptop> <1260345798.5489.70.camel@laptop> Content-Type: text/plain; charset="UTF-8" Date: Wed, 09 Dec 2009 09:33:56 +0100 Message-ID: <1260347636.5489.103.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-12-09 at 09:32 +0100, Thomas Gleixner wrote: > sched_rr_get_param calls task->sched_class->get_rr_interval(task) > without protection against a concurrent sched_setscheduler() call > which modifies task->sched_class. > > Serialize the access with task_rq_lock(task) and hand the rq pointer > into get_rr_interval() as it's needed at least in the sched_fair > implementation. > > Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra