Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751163AbWHMM6L (ORCPT ); Sun, 13 Aug 2006 08:58:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751171AbWHMM6L (ORCPT ); Sun, 13 Aug 2006 08:58:11 -0400 Received: from filfla-vlan276.msk.corbina.net ([213.234.233.49]:35459 "EHLO screens.ru") by vger.kernel.org with ESMTP id S1751163AbWHMM6K (ORCPT ); Sun, 13 Aug 2006 08:58:10 -0400 Date: Sun, 13 Aug 2006 21:21:54 +0400 From: Oleg Nesterov To: Andrew Morton Cc: Ingo Molnar , Thomas Gleixner , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH] do_sched_setscheduler: don't take tasklist_lock Message-ID: <20060813172154.GA1918@oleg> References: <20060813170340.GA1913@oleg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060813170340.GA1913@oleg> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 28 On 08/13, Oleg Nesterov wrote: > > We don't need to take tasklist_lock or disable irqs for > find_task_by_pid() + get_task_struct(). Use RCU locks > instead. On the other hand, I think sched_setscheduler() does need tasklist_lock! It is unsafe do dereference ->signal unless tasklist_lock or ->siglock is held (or p == current). Yes, we pin the task structure, but this can't prevent from release_task()->__exit_signal() which sets ->signal = NULL. So, I think this patch [PATCH] Drop tasklist lock in do_sched_setscheduler commit e74c69f46d93d29eea0ad8647863d1c6488f0f55 is not correct. Am I missed something? 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/