From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754296AbcDNLhe (ORCPT ); Thu, 14 Apr 2016 07:37:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51407 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbcDNLhd (ORCPT ); Thu, 14 Apr 2016 07:37:33 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Thomas Gleixner , Juri Lelli , Ingo Molnar , Steven Rostedt , Xunlei Pang Subject: [PATCH v3 0/6] sched/deadline/rtmutex: Fix two deadline PI issues Date: Thu, 14 Apr 2016 19:37:01 +0800 Message-Id: <1460633827-345-1-git-send-email-xlpang@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 14 Apr 2016 11:37:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PATCH 1~2 mainly fix the deadline PI crash happened when doing enqueue_task_dl()->rt_mutex_get_top_task() due to not holding rq lock for the top waiter update. PATCH 3~6 mainly fix the deadline PI issue happened when doing enqueue_task_dl() after get @pi_task, and access pi_task's data (dl.dl_runtime and dl.dl_period), because the access is not holding any lock(pi lock or rq lock) of pi_task's. PATCH 3~4 are separated out to make PATCH 5 smaller and easier to reviewers. The two issues can be fixed using the same logic, so bind them together as one series. Xunlei Pang (6): rtmutex: Deboost before waking up the top waiter sched/rtmutex/deadline: Fix a PI crash for deadline tasks rtmutex: Move "rt_mutex_waiter" definition to "include/linux/rtmutex.h" sched: Move dl_policy() to "include/linux/sched.h" sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl() sched/deadline/rtmutex: Don't miss the dl_runtime/dl_period update include/linux/init_task.h | 3 +- include/linux/rtmutex.h | 29 +++++++++++++- include/linux/sched.h | 10 ++++- include/linux/sched/deadline.h | 22 +++++++++++ kernel/fork.c | 1 + kernel/futex.c | 5 +-- kernel/locking/rtmutex.c | 84 ++++++++++++++++++++++++++++------------- kernel/locking/rtmutex_common.h | 22 +---------- kernel/sched/core.c | 2 + kernel/sched/deadline.c | 10 +++-- kernel/sched/sched.h | 4 -- 11 files changed, 132 insertions(+), 60 deletions(-) -- 1.8.3.1