Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3769011pxt; Tue, 10 Aug 2021 10:53:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFndXsRS70q7HbBAJIgqhR/KVa7YpEmLZ4o4Oq6hzm9ZISiiJ+rzQvaKoKMDEDozARle7g X-Received: by 2002:aa7:cd03:: with SMTP id b3mr6588109edw.54.1628618038364; Tue, 10 Aug 2021 10:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618038; cv=none; d=google.com; s=arc-20160816; b=ZW1rc/PuBnrd2cYu7MP95oaN4+huVfj1GoU07AbqUPsXtM+Sq4PTbTVgXcgR1BVVsB BFpLkdiOQu88SJGbdE4HLk2mkX0qBh2B1Fu5TIM386jaRVFOwNm7Ff71nP+WR1nBrcb4 94eDPGuvEfWoDdr0rlxGHSn8vyQ1swhq8IVLzsxHBv1jKyiIS7aymhRxvRwhLoiWY7LO EG/WX1NofmOGDLBAeuR1gfyHdbCPe06KFM+U3jt6NMmtlvje6EYP1sZIgu4T3If6ygAH 21oHf89t6VYesOyIeJQoH9dHNUDIO9HINkid4sfoVWkJTbgygGvXyRRmY3QVEBD75Pg2 8dNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v+CIY0OrX6zktH27bWPrRODNlPAfdNCMSD+wGWkLHUY=; b=e8905SWzBD+A01iKR2lEX92duFRrUj3IdV96BGMW2UzAKAwwzU143Wv9TTE/Lq834Y h/fNKKTpzjEFadVjq3LfZku8AglhDvwN/YOMj6WJk++3erHMzVzo7rbF4Kmtj1GI+RG9 kXciY3mdPcpcu6/rxlzvRzuWGelykb0dB6rNA/G53QV09MqqtiZqtGihGeg3P0jXiysf 860PxOzfqNb/M40A8bkC4yX5uldYHC4cPKqLyAl1/VHivvZiUTq4L5jt14IgMdkfuVbe 9b7KcsR1irMER9YTGZ2MPOIP8k/iqufgpUW035lhT/5eYfYsKzIRS/CUhyS57ItKdt6W r2uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="JBq/RUgs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq32si20335560ejc.264.2021.08.10.10.53.14; Tue, 10 Aug 2021 10:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="JBq/RUgs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234028AbhHJRwR (ORCPT + 99 others); Tue, 10 Aug 2021 13:52:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:54476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232854AbhHJRtH (ORCPT ); Tue, 10 Aug 2021 13:49:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D606861207; Tue, 10 Aug 2021 17:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617299; bh=QS1iM6ytuIb8alzj4lbpDhniECJ6zkis2ugGDqvVKJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JBq/RUgsK1NCon+mPT4ImQ76ybLOgt6AqbTyUJD95DzaOFqPH3wjf/II0dCrMhv8+ HIaM4sv02iBBiNjR0oqUFpx0zoKE7/CDTDK+x7dMUT0cIdvd4RV7nwCaxmgkWnMAJH pq/gaErutWigQOKPIrM8BvvXIL4gYqX6rsncuqeM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , "Paulo Alcantara (SUSE)" , Steve French , Sasha Levin Subject: [PATCH 5.10 133/135] smb3: rc uninitialized in one fallocate path Date: Tue, 10 Aug 2021 19:31:07 +0200 Message-Id: <20210810173000.327496586@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve French [ Upstream commit 5ad4df56cd2158965f73416d41fce37906724822 ] Clang detected a problem with rc possibly being unitialized (when length is zero) in a recently added fallocate code path. Reported-by: kernel test robot Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 81e087723777..fdb1d660bd13 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -3466,7 +3466,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid, char *buf) { struct cifs_io_parms io_parms = {0}; - int rc, nbytes; + int nbytes; + int rc = 0; struct kvec iov[2]; io_parms.netfid = cfile->fid.netfid; -- 2.30.2