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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19FCCC4332F for ; Wed, 23 Nov 2022 05:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235398AbiKWFC1 (ORCPT ); Wed, 23 Nov 2022 00:02:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234936AbiKWFB5 (ORCPT ); Wed, 23 Nov 2022 00:01:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E88DE0CA4; Tue, 22 Nov 2022 21:01:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0A42F60916; Wed, 23 Nov 2022 05:01:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5863CC433C1; Wed, 23 Nov 2022 05:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669179716; bh=k68a/G3GQ9o75GfUB0XKtfTQYyzWUYZ7VncGWLyMn+4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J15I9YzfSPGmQJabHFmjxRWahHZU+uEd7LFbrn8bk5NCJeC3HqEwo8MjukRLjDIlv UGLnkSFipvRuX3GrcZyEj7PimvtVEsD0Ok9nfnnl+h7TKPHgh5BYH1oTSMZYuYsIEd hb5E8XxGTNgyFaJm2HKWOjpgqJlkUHLrHF/D4Mq1NRXM5JiPFAbrv8BvL8djFLour5 4c317QQsVdJSnKTQi+2ZAO5vA0rTA2mEb6VhufWqci96m6ItOdUqz9xprx76Xpgrd1 XABamSmKi81g2QZDxPIkTuKNLG0ad2pdnyCvX52N+gpNFdkuYBXhyAxhfnWd7BclWx EqWv4SigX5Nxw== Date: Tue, 22 Nov 2022 21:01:55 -0800 From: Saeed Mahameed To: YueHaibing Cc: saeedm@nvidia.com, leon@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, moshe@nvidia.com, ogerlitz@mellanox.com, eli@mellanox.com, jackm@dev.mellanox.co.il, roland@purestorage.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net/mlx5: Fix uninitialized variable bug in outlen_write() Message-ID: References: <20221121112204.24456-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20221121112204.24456-1-yuehaibing@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21 Nov 19:22, YueHaibing wrote: >If sscanf() return 0, outlen is uninitialized and used in kzalloc(), >this is unexpected. We should return -EINVAL if the string is invalid. > >Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") >Signed-off-by: YueHaibing > applied to net-mlx5, thanks !