Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933977AbaD2MlK (ORCPT ); Tue, 29 Apr 2014 08:41:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933248AbaD2MlI (ORCPT ); Tue, 29 Apr 2014 08:41:08 -0400 Date: Tue, 29 Apr 2014 14:40:53 +0200 From: Oleg Nesterov To: Davidlohr Bueso Cc: Linus Torvalds , Andrew Morton , "Srivatsa S. Bhat" , Linux MM , "linux-kernel@vger.kernel.org" , Rik van Riel , Michel Lespinasse , Hugh Dickins Subject: Re: [BUG] kernel BUG at mm/vmacache.c:85! Message-ID: <20140429124053.GA11878@redhat.com> References: <535EA976.1080402@linux.vnet.ibm.com> <1398724754.25549.35.camel@buesod1.americas.hpqcorp.net> <20140428161120.4cad719dc321e3c837db3fd6@linux-foundation.org> <1398730319.25549.40.camel@buesod1.americas.hpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1398730319.25549.40.camel@buesod1.americas.hpqcorp.net> 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 On 04/28, Davidlohr Bueso wrote: > > @@ -29,6 +30,7 @@ void use_mm(struct mm_struct *mm) > tsk->active_mm = mm; > } > tsk->mm = mm; > + vmacache_flush(tsk); But this can't help, we need to do this in unuse_mm(). And we can race with vmacache_flush_all() which relies on mmap_sem. But perhaps WARN_ON(tsk->mm) at the start makes sense... 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/