Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6870120rwb; Tue, 22 Nov 2022 21:32:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Zy6AA341JcEYpyX2enyUMh9JQLNmNG8Vc5TiLag2MIpY/0jnDVBzWg4Bk0aW8UaCPYpl3 X-Received: by 2002:aa7:c249:0:b0:469:f272:9e6c with SMTP id y9-20020aa7c249000000b00469f2729e6cmr4885207edo.203.1669181545929; Tue, 22 Nov 2022 21:32:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669181545; cv=none; d=google.com; s=arc-20160816; b=a+5zeHQPH2NW4oUoiRH8Ge4qjBJHjfFIUVVlAIvm0uiqLMtJvaSCNW9AxA602Z8HTP /Dwco+aEawfHgr7mp8Z37Z+8RgtvP2M/3ygjMmcYZhJqarBq9+NdcUWjji1FGWA4pfsq qeTFceNc+qhRuA4Wc4tY8HmVpVQGag0kdchFEs7daBSEhQMEdUSrlsegpjIdlg61Nhan REVvkiWgCD4oTRsSfbPF75+fmX1/vYRfWDjOvYoXvMRDcqjjQKnw2dE1sQ409gvecSUt gLTz4R1FqfChzgibjDQa5ABl7tHkHw3BFAr3EmOmrc0sd58YiKpGcCAWL8cnqFbB9t5w GvBg== 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; bh=k68a/G3GQ9o75GfUB0XKtfTQYyzWUYZ7VncGWLyMn+4=; b=rhJQt6E20LkCLqofKw53dZO4uhZH8Rp6QSf2JQuZvTASj3539UBBtz5VQM0O6izYEZ 3Yddzyd09+0E3ZGsLgXsJQex5BgXG0tyHooFCHo52sEdYd4eM5n2cJBtlZBBfUQeIgG2 gLfWlbw0RQi/KRurc4JVVp3LFtzjFBpxYkhfBcRcymCNw/C5B2WaG/zrOR7GqP10E7Mb Lu28Dx8lVPkwfkN8bJMliPwXMe17koLyZ9inh7u70MfyEKKmbmc5cTkeKOB6gL3l4Uly D8g9l6bLIMtcFXQmAlzsR6nixffFsrV+4rb1LYNOPZMK6AQZWkJpvIK1tuzjUgwpsUaB PWew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J15I9Yzf; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020aa7c450000000b00469ba7cbc7asi1901623edr.67.2022.11.22.21.32.02; Tue, 22 Nov 2022 21:32:25 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=J15I9Yzf; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235700AbiKWFC0 (ORCPT + 89 others); Wed, 23 Nov 2022 00:02:26 -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> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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 !