Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934428AbbBCXuT (ORCPT ); Tue, 3 Feb 2015 18:50:19 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:54951 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754682AbbBCXPV (ORCPT ); Tue, 3 Feb 2015 18:15:21 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Mkrtchyan, Tigran" , Trond Myklebust Subject: [PATCH 3.18 30/57] NFSv4.1: Fix an Oops in nfs41_walk_client_list Date: Tue, 3 Feb 2015 15:14:21 -0800 Message-Id: <20150203231216.406459222@linuxfoundation.org> X-Mailer: git-send-email 2.2.2 In-Reply-To: <20150203231211.486950145@linuxfoundation.org> References: <20150203231211.486950145@linuxfoundation.org> User-Agent: quilt/0.63-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1277 Lines: 38 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Trond Myklebust commit 3175e1dcec40fab1a444c010087f2068b6b04732 upstream. If we start state recovery on a client that failed to initialise correctly, then we are very likely to Oops. Reported-by: "Mkrtchyan, Tigran" Link: http://lkml.kernel.org/r/130621862.279655.1421851650684.JavaMail.zimbra@desy.de Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -640,7 +640,7 @@ int nfs41_walk_client_list(struct nfs_cl prev = pos; status = nfs_wait_client_init_complete(pos); - if (status == 0) { + if (pos->cl_cons_state == NFS_CS_SESSION_INITING) { nfs4_schedule_lease_recovery(pos); status = nfs4_wait_clnt_recover(pos); } -- 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/