Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1907469imm; Thu, 11 Oct 2018 01:38:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV60boSIXffDUCVb/6nYgknt6kV9J1K9snes4zrgmaW3eOF/FD1rus8fWeWp42OJy8CaLo2WP X-Received: by 2002:a17:902:e201:: with SMTP id ce1-v6mr620689plb.47.1539247128877; Thu, 11 Oct 2018 01:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539247128; cv=none; d=google.com; s=arc-20160816; b=F1c74jKdpHZ/Z9XaLLyW44N17VwknlnIAiatRvh3a2HLUBFaK2b4HbaCv7pixvPQFJ K9ozJBRVjo4BE4bsvXqz7/HFW7l92VKWIIkNYPigmLoe0i3UPp+OgXHcQ0rA1uA9QHbq lbSyzNo0UTyr+0PpcsZIulnq6z1brnF9sowIcmAmTSLbAc2uD0mEdAi140O5R6+fyHl0 HHiGHzI2jwUowliwhEjEGwP5jTSu4kD/Za+PCwRAgV/gn4Vzl2kcZngmKF+0mwpLEPhL bLg2ilo6JlH6p4FwAgmiw/+VQ5BmShY0LsCSGIT6fAQe5sfzUz+HSfynIF/Tyt2jTTWI 3Hag== 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:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=Kt4dG7phccY4mU7y9947rJLBlaOUpEVukhnn/FZu3Hk=; b=ul6Zc4EKfV9BLNEHWspxEHqb+eA0xjmB7PXa/RfPgQog+enIMYlmltpNufIeb/o2vB lwoii+CSinWeUOIV0s5KuDnD8sEuOyCqsiS0Y75LiHyoQC95nrFzsCOVuSJlcQUHn6pV myvoDOQ3rUot+eGrpqtkMbl5grrJLSPILASCD39RkD22SNRbV5xmR0Zd3o/FrKrjFmLN 4c5MJGAxtE/EYMB1r2vlxsAwiwQ6aUavt/ub5E98E23xD6EAXBeMpvFGhoEzuESoTfq6 TnMbIWGcOxwPMhs6OFJzJ/fOibavG262fV6fgK5Is679pvWGO+qBHN9OVgHeptvi0Laa XoIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=bl2FHE7W; dkim=pass header.i=@codeaurora.org header.s=default header.b=MsCg9Ui5; 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 w71-v6si25862243pgd.163.2018.10.11.01.38.32; Thu, 11 Oct 2018 01:38:48 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=bl2FHE7W; dkim=pass header.i=@codeaurora.org header.s=default header.b=MsCg9Ui5; 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 S1728201AbeJKPex (ORCPT + 99 others); Thu, 11 Oct 2018 11:34:53 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58518 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbeJKPew (ORCPT ); Thu, 11 Oct 2018 11:34:52 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 397B1605FF; Thu, 11 Oct 2018 08:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539245324; bh=bztY30R0HqdBYmuvB1jSZupIQZODwSH/1kw7SYce3xE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=bl2FHE7Wx4Ha2OHxJ6So2bj82WdjSE+jDmg4waHuEoYscAsadkDP3B1P/xudsnHDL IheEUnWrSR1JTGmdi340r3fR67Jc3Z6doSvkNi012UzVIO67FDKYLlf43qGIfq3B2Z tDeUgF5XCmrSVUmeqxQdjg7zzM9TvncT7P5k1i0I= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from x230.qca.qualcomm.com (88-114-240-228.elisa-laajakaista.fi [88.114.240.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 18508605FF; Thu, 11 Oct 2018 08:08:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539245323; bh=bztY30R0HqdBYmuvB1jSZupIQZODwSH/1kw7SYce3xE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=MsCg9Ui5qse6Tvwo0AGHqkS9KcmHtEV6xQI95D5McekLqGZTTx03Iv4bkFbew4Arb SpHDIG8Sd0quCLCR9qSbvFlpySVDDNy6dRhC4pnjdA6Lu2V93XqTeft45pOd954+rz j+LzmIkQoXRrzoxybD9V9QoYE+6T7RQasuGrK63c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 18508605FF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Sergey Matyukevich Cc: Igor Mitsyanko , Arnd Bergmann , Igor Mitsyanko , Avinash Patil , Sergey Matyukevich , "David S. Miller" , Andrey Shevchenko , "linux-wireless\@vger.kernel.org" , "netdev\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] qtnfmac: avoid uninitialized variable access References: <20181009155757.494212-1-arnd@arndb.de> <20181009202507.xs5bcaq5pi4zcps3@bars> <20181010145625.fn2dy2np7e6xxdci@bars> Date: Thu, 11 Oct 2018 11:08:38 +0300 In-Reply-To: <20181010145625.fn2dy2np7e6xxdci@bars> (Sergey Matyukevich's message of "Wed, 10 Oct 2018 14:56:33 +0000") Message-ID: <87bm80x5vd.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sergey Matyukevich writes: >> > When qtnf_trans_send_cmd_with_resp() fails, we have not yet initialized >> > 'resp', as pointed out by a valid gcc warning: >> > >> > drivers/net/wireless/quantenna/qtnfmac/commands.c: In function >> > 'qtnf_cmd_send_with_reply': >> > drivers/net/wireless/quantenna/qtnfmac/commands.c:133:54: error: >> > 'resp' may be used uninitialized in this function >> > [-Werror=maybe-uninitialized] >> > >> > Since 'resp_skb' is also not set here, we can skip all further >> > processing and just print the warning and return the failure code. >> > >> > Fixes: c6ed298ffe09 ("qtnfmac: cleanup and unify command error handling") >> > Signed-off-by: Arnd Bergmann >> >> Thanks for the patch! And for reminding me that I forgot to enable >> gcc warnings in CI builds in addition to sparse checks. >> >> Reviewed-by: Sergey Matyukevich > > Hi Kalle, > > Could you please hold back applying this patch for now. We have got > another report for the same function, this time static analysis tool > warning. It looks like the patch from Arnd does not cover both cases. > So we will take a closer look and send a combined fix later. Ok, I'll drop this from my queue. Please resend whatever patch I need to apply. -- Kalle Valo