Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755523Ab2BHQ11 (ORCPT ); Wed, 8 Feb 2012 11:27:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906Ab2BHQ10 (ORCPT ); Wed, 8 Feb 2012 11:27:26 -0500 Date: Wed, 8 Feb 2012 17:20:13 +0100 From: Oleg Nesterov To: Anton Vorontsov Cc: Greg KH , KOSAKI Motohiro , "Eric W. Biederman" , "Paul E. McKenney" , Paul Mundt , Russell King , Mike Frysinger , Benjamin Herrenschmidt , Richard Weinberger , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] blackfin: Fix possible race on task->mm Message-ID: <20120208162013.GC17177@redhat.com> References: <20120207064809.GA29061@oksana.dev.rtsoft.ru> <20120207065054.GF1496@oksana.dev.rtsoft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120207065054.GF1496@oksana.dev.rtsoft.ru> 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: 846 Lines: 24 On 02/07, Anton Vorontsov wrote: > > Even when in atomic context, grabbing irqsave variant of tasklist lock > is not enough to protect task->mm from disappearing on SMP machines. > Instead, we have to grab the task lock. Yes, but afaics there is no reason for write_lock_irqsave(tasklist). read_lock() should be enough. I know nothing about arch/blackfin/ but in fact this looks simply wrong. For example. sysrq_showregs_othercpus() does smp_call_function(showacpu) and showacpu() show_stack()->decode_address(). Now suppose that IPI interrupts the task holding read_lock(tasklist). Mike? 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/