Received: by 10.192.165.148 with SMTP id m20csp2428273imm; Sun, 22 Apr 2018 06:58:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/PZMRdrnGXCR03I2k6o4BcBNC85ZneGZrtsobmEbDoIOyshXo+hZ9wZEGX0NkSiBpeML38 X-Received: by 10.99.109.132 with SMTP id i126mr14330051pgc.414.1524405519581; Sun, 22 Apr 2018 06:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524405519; cv=none; d=google.com; s=arc-20160816; b=ZqeoGezwRw3LZjt2zWadfPzXbK0pNBtRr1wnYtE8rGFX0nwJcEVSUwEwwWVwfsiQM0 2dJazujm6u6VQLpIKO979HI1JcaoAzyMho0eR9DbHxTb5k60eTxibYO2wTJMdvT5O6Qp Iso0PTJu3z8vpaUY45aICmJf6kTKKtSiDhS5fD8wQXLmp8BrN+mP1G7OWsciU1pJeKJM /HmDIfGXcww1AzabxIua82XUr6/dnJwDgboSDB4bzYZZsa48mf4jc8tRAhZo3BLNWQ3i Nu7EVlHtcjyZjlP8EapF7CbJ03e6c6GDCDOh+dGhFuH7b4EjkNayLyMNHxl9d3W9TUHs f+3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OD2wnv0Mi5QoqLn3dhe5/Fl/OjS5xmT7+2hzFwAV3nI=; b=xxPELVSAZhBVJsi/czmRagShZtDuZlcbmNkXlBfNlZMQPmxR09GIjgzaEejJiOIc8Q +EAi6VFqGne5v9oWwZSukyXVHNcFiWi/WMqiErSBpsc26+iVLkVb8Z+9Ra5xj3wJazEL iR1C7M/6/H5arj4XOJ69Q+TAQii1ITv86Qr8d/1+o7BHNaAcB8jK+ffAfBu2VSLBNe0/ MkzG7xsSrGDdOwrxHZSqZkaxEMwCyjDEJDprZFZqtrQT64itiwYS005UuAlgZely4AOV z+62FmJiC1UFWUUiKWf8I9pnKctGPgG1hBrnrQGttGr54z4ZGKJykFbiTcbGLsQBBrgg TbHw== 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 n2-v6si9422196plk.374.2018.04.22.06.58.25; Sun, 22 Apr 2018 06:58:39 -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 S1753888AbeDVN45 (ORCPT + 99 others); Sun, 22 Apr 2018 09:56:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45402 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838AbeDVN4v (ORCPT ); Sun, 22 Apr 2018 09:56:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4C64DCCA; Sun, 22 Apr 2018 13:56:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Aurelien Aptel , Steve French Subject: [PATCH 4.16 057/196] CIFS: fix sha512 check in cifs_crypto_secmech_release Date: Sun, 22 Apr 2018 15:51:17 +0200 Message-Id: <20180422135107.162407950@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gustavo A. R. Silva commit 70e80655f58e17a2e38e577e1b4fa7a8c99619a0 upstream. It seems this is a copy-paste error and that the proper variable to use in this particular case is _sha512_ instead of _md5_. Addresses-Coverity-ID: 1465358 ("Copy-paste error") Fixes: 1c6614d229e7 ("CIFS: add sha512 secmech") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Aurelien Aptel CC: Stable Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/cifsencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -829,7 +829,7 @@ cifs_crypto_secmech_release(struct TCP_S server->secmech.md5 = NULL; } - if (server->secmech.md5) { + if (server->secmech.sha512) { crypto_free_shash(server->secmech.sha512); server->secmech.sha512 = NULL; }