Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1317672yba; Tue, 2 Apr 2019 06:46:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzL98vYzxoNCDoM5aRpoy8YWVilNYGkwbnCizD647IhFNvRhh6/Hpi6D6k8tpenj+/t7xBw X-Received: by 2002:aa7:920b:: with SMTP id 11mr66891749pfo.3.1554212797596; Tue, 02 Apr 2019 06:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212797; cv=none; d=google.com; s=arc-20160816; b=XWpwPDL9O4UIGejXEvQk9UmqDLv41TCK9tkf2M4WCUn5mO1SVruFPzGUeIaUUzA5Se WkTbJgbhJuQdBI56Sdm0sop+tnOjwoDPR6BTeXDrIvujrUixHvnF043bmM4aYYLHH4ON d76DRb7JkMTQSyxprwQwqWVbpj2Tafx5M8r/dWh4MH8q9uVkVDbRxNIee2m3CYht9gOx QdqBa1oR9kyw/Bad0jIpj19brEhOa2jrzt+GGVXrDkcwr4X54qdaZFwBvdAUsfM2XUhZ HKWwdDkMbD8nY+aEuBVUrD3WFfHL32E9XI6KroXAqJPEG6EUm9bjjvKm67XfyRvSgvEC zUtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=m/JbC4px4LUc/cjzcuKzFQNskCfVqy41J/gsG2A/zRs=; b=upZ8wt/LKhRKWXQCkqWQaUVJCVRApQymxjppJvHyLTc3de7cifOwDpysis0vagzWl5 alW9N8cH7zKZsBqAl0MGh6+UOwse2jPKqclFmT/42Gt0i6pt+zYb4mn8l8zStJr89wJA ntQ+y1YADtAOKfRzxQDQUyXyS32zSlKfxOAQXLdjoDfYMfbciK/wh9pFkhQ8xejeTHfZ 7wj9aSIE/1HSac9+LSrDZ43HmDlMAE5TUmbPALCqxBqDqnWWUJ2p78qHMg9lFslx/7aO PtrVApOd9oduIKfUnwNMRKssg9ijqxpa5xrOqak0oLafUqYqfhnMy+rHy9HgvBtWCM8p siPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 q20si9116875pgv.6.2019.04.02.06.46.22; Tue, 02 Apr 2019 06:46:37 -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; 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 S1731776AbfDBNoF (ORCPT + 99 others); Tue, 2 Apr 2019 09:44:05 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43556 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731499AbfDBNkK (ORCPT ); Tue, 2 Apr 2019 09:40:10 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJe3-0002ny-MC; Tue, 02 Apr 2019 14:40:07 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdy-0004yN-7w; Tue, 02 Apr 2019 14:40:02 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Dan Aloni" , "Stephan Seitz" Date: Tue, 02 Apr 2019 14:38:28 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 98/99] Revert "cifs: empty TargetInfo leads to crash on recovery" In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ben Hutchings Revert commit 36a0db05310fbee38b59fed7e1306c1a095f8c8f, a minimal backport of commit cabfb3680f78981d26c078a26e5c748531257ebb upstream. We need a complete backport to avoid a regression for SMB3 authenticated mounts. Reported-by: Stephan Seitz References: https://lists.debian.org/debian-lts/2019/03/msg00071.html Cc: Dan Aloni Signed-off-by: Ben Hutchings --- --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -608,7 +608,6 @@ SMB2_sess_setup(const unsigned int xid, */ kfree(ses->auth_key.response); ses->auth_key.response = NULL; - ses->auth_key.len = 0; /* * If memory allocation is successful, caller of this function @@ -769,7 +768,6 @@ ssetup_exit: rc = server->ops->generate_signingkey(ses); kfree(ses->auth_key.response); ses->auth_key.response = NULL; - ses->auth_key.len = 0; if (rc) { cifs_dbg(FYI, "SMB3 session key generation failed\n"); @@ -794,7 +792,6 @@ keygen_exit: if (!server->sign) { kfree(ses->auth_key.response); ses->auth_key.response = NULL; - ses->auth_key.len = 0; } kfree(ses->ntlmssp);