Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758127Ab0HQSMo (ORCPT ); Tue, 17 Aug 2010 14:12:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19373 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758096Ab0HQSMn (ORCPT ); Tue, 17 Aug 2010 14:12:43 -0400 Date: Tue, 17 Aug 2010 20:09:53 +0200 From: Oleg Nesterov To: David Howells Cc: Vegard Nossum , Nick Piggin , Peter Zijlstra , "Paul E. McKenney" , LKML Subject: Re: 2.6.35+vfs-scale: INFO: suspicious rcu_dereference_check() usage (kernel/exit.c:1387) Message-ID: <20100817180953.GA22177@redhat.com> References: <31145.1281988884@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31145.1281988884@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1343 Lines: 43 On 08/16, David Howells wrote: > > Vegard Nossum wrote: > > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1386,8 +1386,7 @@ static int wait_task_stopped(struct wait_opts *wo, > if (!unlikely(wo->wo_flags & WNOWAIT)) > *p_code = 0; > > - /* don't need the RCU readlock here as we're holding a spinlock */ > - uid = __task_cred(p)->uid; > + uid = task_uid(p); > unlock_sig: > spin_unlock_irq(&p->sighand->siglock); > if (!exit_code) > @@ -1460,7 +1459,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p) > } > if (!unlikely(wo->wo_flags & WNOWAIT)) > p->signal->flags &= ~SIGNAL_STOP_CONTINUED; > - uid = __task_cred(p)->uid; > + uid = task_uid(p); > spin_unlock_irq(&p->sighand->siglock); > > pid = task_pid_vnr(p); Acked-by: Oleg Nesterov Vegard, perhaps you can take care of wait_task_zombie() too? Of course, if you wish. Like wait_task_stopped(), it doesn't really need RCU lock. But if we change it to use task_uid() to shut up rcu_dereference_check(), then we can kill task_is_dead(). Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/