Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbdLHETD (ORCPT ); Thu, 7 Dec 2017 23:19:03 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:46609 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183AbdLHETB (ORCPT ); Thu, 7 Dec 2017 23:19:01 -0500 Message-ID: <1512706738.18523.236.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 29/49] nfs: Dont take a reference on fl->fl_file for LOCK operation From: Ben Hutchings To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Benjamin Coddington , Jeff Layton , Trond Myklebust , Sasha Levin Date: Fri, 08 Dec 2017 04:18:58 +0000 In-Reply-To: <20171207124707.826264155@linuxfoundation.org> References: <20171207124703.742654162@linuxfoundation.org> <20171207124707.826264155@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1060 Lines: 30 On Thu, 2017-12-07 at 14:07 +0100, Greg Kroah-Hartman wrote: > 4.4-stable review patch.  If anyone has any objections, please let me know. > > ------------------ > > From: Benjamin Coddington > > > [ Upstream commit 4b09ec4b14a168bf2c687e1f598140c3c11e9222 ] > > I have reports of a crash that look like __fput() was called twice for > a NFSv4.0 file.  It seems possible that the state manager could try to > reclaim a lock and take a reference on the fl->fl_file at the same time the > file is being released if, during the close(), a signal interrupts the wait > for outstanding IO while removing locks which then skips the removal > of that lock. > > Since 83bfff23e9ed ("nfs4: have do_vfs_lock take an inode pointer") has > removed the need to traverse fl->fl_file->f_inode in nfs4_lock_done(), > taking that reference is no longer necessary. [...] No objection to this in 4.4, but that other commit only went into 4.2 so this fix doesn't look suitable for 3.18. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.