Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp550389rwb; Tue, 4 Oct 2022 07:34:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5D+g4b4X7FkegeCYqGXa3C8eGWQxIp6CRruzj+JttjLVmNZBH1AWANHT0zchcUMYWcHhyl X-Received: by 2002:a17:902:ac88:b0:17b:f859:46f9 with SMTP id h8-20020a170902ac8800b0017bf85946f9mr23927720plr.84.1664894093683; Tue, 04 Oct 2022 07:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664894093; cv=none; d=google.com; s=arc-20160816; b=dtkKPcTOvv1S+XWc7hb8MAYR8GNcWpM7e3ofqOpJs/WMHpF708gPlNhJAXKDiEh7gy atO5Pd9sDMwnIVi46vCTr3y260mJsIIBFcs0bQ99TwcX/OhIxJguJDqk9reAP2XcIUX3 HHyYEp4sxhC3vOfbbcPLP7QWJY8SstDBQwPPiC8Cu/fGK7Ti0gr7LyNXqNtXBM1Z8yqF D7qzwz6EH5oJRr6RPNYW6+kqOXU4MSv3JZK9BIbs1nxD//fusFr8/qZ+6dV/oELkaYvd iznC0hIGtyn5++sKu1VMgCfI3KQ6aZERZzzJIzIds0dhd2CySl0Yt51Ny8RwNtS3wFyA wC/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=5gUUNgEDhizGEpFxKtQMBGFV8uYs1I5bUDwiFyCdJPs=; b=WMfzNUQ5mjTaXWx10S8NEghPXPhOu+8Ftzguv9p/o4EO7LU94NM7x2fTRkKB6tsqKS DOZ/LWGl9nWXM9teqoLejEkFSj9fQHv3T4psYmVLkcT322F3eTDA1Cs+/OYuMsaGgZov q9gDRfTwMxGsisMZQHeuKK1/fq6yc/QBDNXHH7uvcuNz8SnAU5CuTpeCTbgrkwITKg2k xdQ5CYdDvUvsHqYnxdOm4/Jla47Y8Rzf+HRa+uHMLAy3+uZ44bP2gvHUojDvAtszlAkt Mw4LfNAOa3z3TbzAvyt7ddcuhgSjBM1c9IXh4rwKAAbgnHFR6+ZtxBf3s0kJrBTL0r9G At2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Zt/OhUS5"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=nnwkZhu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a632051000000b0043c3749e13fsi13883940pgm.368.2022.10.04.07.34.35; Tue, 04 Oct 2022 07:34:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Zt/OhUS5"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=nnwkZhu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbiJDOXM (ORCPT + 99 others); Tue, 4 Oct 2022 10:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiJDOXK (ORCPT ); Tue, 4 Oct 2022 10:23:10 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DA7930F6B; Tue, 4 Oct 2022 07:23:10 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 08A432198D; Tue, 4 Oct 2022 14:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664893389; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5gUUNgEDhizGEpFxKtQMBGFV8uYs1I5bUDwiFyCdJPs=; b=Zt/OhUS5ydTQ9UGifRGK41t6GwEwC9hWteg+uA6BanmdxcmrHSUmnRwaax6muvmAzKKREl HvCVf6R1AOho0RNxtGGq8BX7drQ5X+U22DhcXFne3NLKWdoz22LRBr9nP61FvgBdh/CnD2 lrLR8nF+sDF1Wgk/6b85JyPAcKbmAGw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664893389; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5gUUNgEDhizGEpFxKtQMBGFV8uYs1I5bUDwiFyCdJPs=; b=nnwkZhu5TLtAve4z+S1eE5DR29Ezv4gT6tG61WizYluhc4rs1VB3OA9gmZrHP6yk89nLJM fz5UHGvz5kGnMFBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 80A1D139EF; Tue, 4 Oct 2022 14:23:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Ds5VEcxBPGPpdAAAMHmgww (envelope-from ); Tue, 04 Oct 2022 14:23:08 +0000 Date: Tue, 4 Oct 2022 11:23:06 -0300 From: Enzo Matsumiya To: Muhammad Usama Anjum Cc: Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , kernel@collabora.com, kernel-janitors@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] cifs: remove initialization value Message-ID: <20221004142306.ysgh45nhgdo4z3ok@suse.de> References: <20221004062333.416225-1-usama.anjum@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20221004062333.416225-1-usama.anjum@collabora.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Usama, On 10/04, Muhammad Usama Anjum wrote: >Don't initialize the rc as its value is being overwritten before its >use. Being bitten by an unitialized variable bug as recent as 2 days ago, I'd say this is a step backwards from the "best practices" POV. >Signed-off-by: Muhammad Usama Anjum >--- > fs/cifs/smb2pdu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c >index 0600f0a07628..2bf43c892ae6 100644 >--- a/fs/cifs/smb2pdu.c >+++ b/fs/cifs/smb2pdu.c >@@ -879,7 +879,7 @@ SMB2_negotiate(const unsigned int xid, > struct smb2_negotiate_rsp *rsp; > struct kvec iov[1]; > struct kvec rsp_iov; >- int rc = 0; >+ int rc; > int resp_buftype; > int blob_offset, blob_length; > char *security_blob; >-- >2.30.2 Cheers, Enzo