From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50295 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756167AbcDJSBU (ORCPT ); Sun, 10 Apr 2016 14:01:20 -0400 Subject: Patch "nfsd: fix deadlock secinfo+readdir compound" has been added to the 4.5-stable tree To: bfields@redhat.com, gregkh@linuxfoundation.org Cc: , From: Date: Sun, 10 Apr 2016 11:01:14 -0700 Message-ID: <146031127444155@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled nfsd: fix deadlock secinfo+readdir compound to the 4.5-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfsd-fix-deadlock-secinfo-readdir-compound.patch and it can be found in the queue-4.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 2f6fc056e899bd0144a08da5cacaecbe8997cd74 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Wed, 2 Mar 2016 16:36:21 -0800 Subject: nfsd: fix deadlock secinfo+readdir compound From: J. Bruce Fields commit 2f6fc056e899bd0144a08da5cacaecbe8997cd74 upstream. nfsd_lookup_dentry exits with the parent filehandle locked. fh_put also unlocks if necessary (nfsd filehandle locking is probably too lenient), so it gets unlocked eventually, but if the following op in the compound needs to lock it again, we can deadlock. A fuzzer ran into this; normal clients don't send a secinfo followed by a readdir in the same compound. Signed-off-by: J. Bruce Fields Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -878,6 +878,7 @@ nfsd4_secinfo(struct svc_rqst *rqstp, st &exp, &dentry); if (err) return err; + fh_unlock(&cstate->current_fh); if (d_really_is_negative(dentry)) { exp_put(exp); err = nfserr_noent; Patches currently in stable-queue which might be from bfields@redhat.com are queue-4.5/nfsd-fix-deadlock-secinfo-readdir-compound.patch queue-4.5/nfsd4-fix-bad-bounds-checking.patch