From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754843AbcDTM0B (ORCPT ); Wed, 20 Apr 2016 08:26:01 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60071 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbcDTM0A (ORCPT ); Wed, 20 Apr 2016 08:26:00 -0400 Date: Wed, 20 Apr 2016 14:25:52 +0200 From: Peter Zijlstra To: xlpang@redhat.com Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Juri Lelli , Ingo Molnar , Steven Rostedt Subject: Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl() Message-ID: <20160420122552.GY3430@twins.programming.kicks-ass.net> References: <1460633827-345-1-git-send-email-xlpang@redhat.com> <1460633827-345-6-git-send-email-xlpang@redhat.com> <20160414153111.GC2975@worktop.cust.blueprintrf.com> <57104ADB.20402@redhat.com> <57104FA0.4090509@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57104FA0.4090509@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2016 at 10:19:12AM +0800, Xunlei Pang wrote: > On 2016/04/15 at 09:58, Xunlei Pang wrote: > > On 2016/04/14 at 23:31, Peter Zijlstra wrote: > >> On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wrote: > >>> We access @pi_task's data without any lock in enqueue_task_dl(), though > >>> checked "dl_prio(pi_task->normal_prio)" condition, that's not enough. > >> The proper fix is to ensure that pi_task is guaranteed to be blocked. > > Even if pi_task was blocked, its parameters are still allowed to be changed, > > so we have to do that. Did I miss something? > > > > Regards, > > Xunlei > > Fortunately, I just reproduced through an overnight test, so it really happened in reality as I thought. But what happens? How is it changed when it is blocked?