From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A190C433E0 for ; Mon, 1 Jun 2020 18:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BD15207D0 for ; Mon, 1 Jun 2020 18:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035010; bh=l+56c4VIyg+Wlb4RtIt7WDh2QN2wMhTtXg7rIZ4wxf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WhmdZknkiOdf58KkofJMy82f5X47HorpfqIdVjlGhS3GZD4XHYhC8cBW+y4bEdMAr Klhs6nwUnmYh/pBh96d0TQsuP4/MQ0c53l3cBlxhSb8f3zA8U6DX82yQOsbEzE2oPr xObS2d0y3eKiXrYtvAxASn4yBt+L9O8m2v09PGRM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730957AbgFASKG (ORCPT ); Mon, 1 Jun 2020 14:10:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:56654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730937AbgFASKE (ORCPT ); Mon, 1 Jun 2020 14:10:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5E192077D; Mon, 1 Jun 2020 18:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035004; bh=l+56c4VIyg+Wlb4RtIt7WDh2QN2wMhTtXg7rIZ4wxf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mnw1Ymh3WexvP90HD848Sey05CMDjZzFUv/ay6YkXYdNzLnDZ8tQ1UhxXuBcViCbN Q/IcRTK1KJbxj9omKvI657N2dlphqR7zGtgFr7I6Kp6zz0RG4p1Fk7FeWg6b2MQsMB 0ceAxCK0QIAx+uhWY/fYvVYn3ISWwkQkQULowr60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Coverity , Steve French , Shyam Prasad N , Sasha Levin Subject: [PATCH 5.4 059/142] cifs: Fix null pointer check in cifs_read Date: Mon, 1 Jun 2020 19:53:37 +0200 Message-Id: <20200601174044.042757329@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steve French [ Upstream commit 9bd21d4b1a767c3abebec203342f3820dcb84662 ] Coverity scan noted a redundant null check Coverity-id: 728517 Reported-by: Coverity Signed-off-by: Steve French Reviewed-by: Shyam Prasad N Signed-off-by: Sasha Levin --- fs/cifs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index b095094c0842..4959dbe740f7 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3997,7 +3997,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset) * than it negotiated since it will refuse the read * then. */ - if ((tcon->ses) && !(tcon->ses->capabilities & + if (!(tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files)) { current_read_size = min_t(uint, current_read_size, CIFSMaxBufSize); -- 2.25.1