lkml.org 
[lkml]   [2016]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2 2/9] sched/rtmutex/deadline: Fix a PI crash for deadline tasks
> --- a/kernel/locking/rtmutex.c
> +++ b/kernel/locking/rtmutex.c
> @@ -256,6 +256,16 @@ rt_mutex_dequeue_pi(struct task_struct *
> RB_CLEAR_NODE(&waiter->pi_tree_entry);
> }
>

Shouldn't we add a comment about what locks are expected to be held
when calling this? Especially if it can be called outside this file.

> +void rt_mutex_update_top_task(struct task_struct *p)
> +{
> + if (!task_has_pi_waiters(p)) {
> + p->pi_top_task = NULL;
> + return;
> + }
> +
> + p->pi_top_task = task_top_pi_waiter(p)->task;
> +}
> +
> /*
> * Calculate task priority from the waiter tree priority
> *
> @@ -273,10 +283,7 @@ int rt_mutex_getprio(struct task_struct
>

Any specific locks that must be held when calling this?

> struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
> {
> - if (likely(!task_has_pi_waiters(task)))
> - return NULL;
> -
> - return task_top_pi_waiter(task)->task;
> + return task->pi_top_task;
> }

-- Steve

\
 
 \ /
  Last update: 2016-09-26 17:21    [W:0.193 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site