Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2437903ybn; Thu, 26 Sep 2019 11:52:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKil5kXQ4nHl7NR1PuTa5jUHs9CYfPjrIkCg2vTFsgm5mBQlZgM+9TVeA3u00kiF8Om8OB X-Received: by 2002:a17:907:215a:: with SMTP id rk26mr4487331ejb.49.1569523964706; Thu, 26 Sep 2019 11:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569523964; cv=none; d=google.com; s=arc-20160816; b=VvyB2AUuqO21VnAQf58J/iGgtB72lBot68QFsyghsLrN7wDbvwMhEzHBiEHWy7isEu rva7AzpbCQBL5Dvgw4U8hQk5z05jC6a2/b0PPzm+aMzH3Ya4sC9722PokMYQNuqBrXyD +P/yYUVLi01/5m509EtJGlUqfvynJwbxDSshbIIzBk0PwbmknQPLeIWLKtxuSH2iQtgE IjxopLSzfCA7Erjp3h2LDRoQxgB6OG3dFDpzOx3GKocUy+v4ZmDbx1nvL65oQxerftKy veIGGUxZVTkACJbcAmmjXGuf7gfzxGr9kRwI3oocCsSXFCQx76HU/JO9TsPTYOkL4Yv2 jqPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nIyHvTAGG0PPPrIhutULDQfPFwJtw5CYsA3zaxkj3L8=; b=GnonpE7R5pfYQJWkdgu+nsNtSKmrjX72q5Hkvrno9A9Tq0IDEHn6lpCInpEXbyknU7 xAGNlXjOzcPDiojp/B4rrU+sR/lxcEWUJ3kUXRSlhbx8v3tcR21Kx0xnNZPG8IuMNzcs DdD/ELWGhpZnXOvjxMdlFHtPx18bTdn1t3cN1iur4znxx1fDg6p1/4ZLhfVksBeWs+Cq 8Y3I0ojkp/JQKK6/BUgVHgnCXyH9MVns2eMSY0Tnj/hgx0T5wO9wa169GeVO6n21WwNK jUO0CT7wrrLD4xkjreUYFFdCHNCDDuuk9cVOrnHIbveKHimWLpwy6slN+tBNyv+TeJBM QD9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="S/xebOxp"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si1512072ejb.212.2019.09.26.11.52.20; Thu, 26 Sep 2019 11:52:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="S/xebOxp"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbfIZSuX (ORCPT + 99 others); Thu, 26 Sep 2019 14:50:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40162 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfIZSuX (ORCPT ); Thu, 26 Sep 2019 14:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nIyHvTAGG0PPPrIhutULDQfPFwJtw5CYsA3zaxkj3L8=; b=S/xebOxpZka6SndPedzCpkcQA 0NRBrkthjEKisbOCOwOYzzgOGCimxUOivqG0DqCdghGTyAZGcN/94sgodc9nKolMxvAovO10iFD8f 79ATXYTEbb9HzzSaBP0OGDM4N8eGjqwB5L027rM/vrfiP411u+GzjpeMkLy6mYraN51PxlNKsRQ/E Bgtseu8P/hYASY9aQhhvkxODL9dtYaX/KhGuZEbhYd+p7Jk5nP6qYwfLdc68NR7dZcaJYolF0NMIO TqTRt7esK/uWlvyXxyPArwTtW5ld9POZrYh6O3HzwwsNIuSTMlRmoOrTReimeWXdnI7SPrvGnKzF2 /JgWZKscA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDYqK-0006mv-0s; Thu, 26 Sep 2019 18:50:20 +0000 Date: Thu, 26 Sep 2019 11:50:19 -0700 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Johannes Weiner , Andrew Morton , Josef Bacik , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: drop mmap_sem before calling balance_dirty_pages() in write fault Message-ID: <20190926185019.GA2147@bombadil.infradead.org> References: <20190924171518.26682-1-hannes@cmpxchg.org> <20190924174809.GH1855@bombadil.infradead.org> <20190924194238.GA29030@cmpxchg.org> <20190924204608.GI1855@bombadil.infradead.org> <20190924214337.GA17405@cmpxchg.org> <20190926134923.wqlkymjdfxd4iymh@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190926134923.wqlkymjdfxd4iymh@box> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 04:49:23PM +0300, Kirill A. Shutemov wrote: > It happens if the VMA got unmapped under us while we dropped mmap_sem > and inode got freed. > > Pinning the file if we drop mmap_sem fixes the issue. > > Signed-off-by: Kirill A. Shutemov > Reported-by: syzbot+03ee87124ee05af991bd@syzkaller.appspotmail.com > Cc: Hillf Danton > Cc: Matthew Wilcox > Cc: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle)