Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421916

Re: [RFC][PATCH 6/8] sched/rtmutex: Refactor rt_mutex_setprio()

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 6/8] sched/rtmutex: Refactor rt_mutex_setprio()
Date 2016-06-14 16:10 +0200
Message-ID <rJXct-5RE-7@gated-at.bofh.it> (permalink)
References <rHvDI-7fg-35@gated-at.bofh.it> <rHvNo-7ix-19@gated-at.bofh.it> <rJWq5-5jT-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 14, 2016 at 02:14:24PM +0100, Juri Lelli wrote:
> Hi,
> 
> still digesting this change, but I'll point out below why I think you
> are hitting a NULL ptr dereference (discussed on IRC).
> 
> On 07/06/16 21:56, Peter Zijlstra wrote:
> 
> > --- a/kernel/locking/rtmutex.c
> > +++ b/kernel/locking/rtmutex.c
> > @@ -256,61 +256,16 @@ rt_mutex_dequeue_pi(struct task_struct *
> >  	RB_CLEAR_NODE(&waiter->pi_tree_entry);
> >  }
> >  
> > +static void rt_mutex_adjust_prio(struct task_struct *p)
> >  {
> > +	struct task_struct *pi_task = NULL;
> >  
> > +	lockdep_assert_held(&p->pi_lock);
> >  
> > +	if (!task_has_pi_waiters(p))
> 
> Shouldn't this be the other way around?
> 
>  if (task_has_pi_waiters(p))
>  	pi_task = ...

Yeah, that would make more sense :-)

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC][PATCH 6/8] sched/rtmutex: Refactor rt_mutex_setprio() Juri Lelli <juri.lelli@arm.com> - 2016-06-14 15:20 +0200
  Re: [RFC][PATCH 6/8] sched/rtmutex: Refactor rt_mutex_setprio() Peter Zijlstra <peterz@infradead.org> - 2016-06-14 16:10 +0200

csiph-web