Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbcDOB64 (ORCPT ); Thu, 14 Apr 2016 21:58:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51096 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbcDOB6z (ORCPT ); Thu, 14 Apr 2016 21:58:55 -0400 Reply-To: xlpang@redhat.com Subject: Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl() 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> To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Juri Lelli , Ingo Molnar , Steven Rostedt From: Xunlei Pang Message-ID: <57104ADB.20402@redhat.com> Date: Fri, 15 Apr 2016 09:58:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160414153111.GC2975@worktop.cust.blueprintrf.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 469 Lines: 11 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