[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101109202051.GT4032@linux.vnet.ibm.com>
Date: Tue, 9 Nov 2010 12:20:51 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: suspicious rcu_dereference_check() usage splat
On Tue, Nov 09, 2010 at 11:09:31AM +0200, Sergey Senozhatsky wrote:
> On (11/08/10 12:24), Paul E. McKenney wrote:
> > Looking over the patch again, the scope of the RCU read-side critical
> > section needs to expand to cover the use of the pointer as well as the
> > call to find_task_by_vpid(). So, for example:
> >
> > case IOPRIO_WHO_PROCESS:
> > rcu_read_lock();
> > if (!who)
> > p = current;
> > else
> > p = find_task_by_vpid(who);
> > if (p)
> > ret = set_task_ioprio(p, ioprio);
> > rcu_read_unlock();
> > break;
> > case IOPRIO_WHO_PGRP:
> >
> >
> > Otherwise, the task could go away before the last use.
> >
> > Sergey, could you please make this change and re-post your patch?
> >
> > Thanx, Paul
> >
>
> Hello,
> Should we protect set_task_ioprio? Critical operations are protected
> with rcu_read_lock/rcu_read_unlock in set_task_ioprio, the rest is protected
> via task_lock(task)/task_unlock(task).
At first glance, this function's locking is OK, but I must defer to
people who know this code better than do I.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists