Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1962207rdb; Tue, 5 Sep 2023 09:59:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2YklbZznkKKxYNX9Il+z5f7nRdYhNye2CEhF8zZfZgrkbNtXSOIiBo2CG5FXf2KYCY3T8 X-Received: by 2002:a17:902:d489:b0:1c0:ecbb:182e with SMTP id c9-20020a170902d48900b001c0ecbb182emr15870203plg.2.1693933187188; Tue, 05 Sep 2023 09:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693933187; cv=none; d=google.com; s=arc-20160816; b=n3ikRkb/QP9X3jQtDgBPFWYwekPLe8zoV1f1ll5QJ3kMKH/CzXLZhRML8JUhW2v0rY EXWBtXvzg/I65tejKRBF3fuBUL3Q+4qMgZ7M+xVSEzCyUm2duZHnzhw5Mlw1mBtzmE6Y VjY5zquFzcR2mV9gJ8H/q0QS7vYaLvd15RkATJFP7YvIPjsGa133asY9XUvBG8E+Huz9 4/73gSKa8YXH2zaUQrkPyeE/y8kpuLw2Ze0M546pRj5DaFWssp0F3Y5t3/PjFQ8IZkVJ cD9Nr425OrYr05IUMjI9Nq3aESF+mCnMxVfV//uWRhhnMX4xm31t7ZP2mH5dPSfqkiOv Emuw== 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; bh=JDzr5BbAThhMu/ZXx88v/teUV1UOlvSjGyA56RqZ5OQ=; fh=PssfUinn95mux9pW4BxHfWA7DlmKZ4+atuEWOE4G9Wc=; b=W0HrbelmI2evB/cOQuvDaKDzN0QM8WFuE2goX1nm5oS/2pl1eScp/MN5cLC2Dd9dyh PKj1Evthj8joZNPxTcvOroeZD/ekXEtiROq01Wp+tp4Y+Fbe1vhalorOBo+hudNsx7wz wMJ13heO9Cl5iRqRcNwDmtU7H24mhR1C3E5MGQ1yTBarK2yOq8QAFkysJHimX+l7/fem A7tbRuBL9UQvjfMirJmF2qAFjAtgc796GzSlF2CMIoFPBsf9l197goT96cWnE8R4ZI90 5iOHbwxbzIDjDIc80axFDwIl6oXoorY6fpTlDBCUt4RdDj0zwhnPCyb3xzNI75gA15Cu 2FJQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li8-20020a170903294800b001b9d5f07068si9152760plb.585.2023.09.05.09.59.34; Tue, 05 Sep 2023 09:59:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=red-soft.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245711AbjIEQk7 (ORCPT + 99 others); Tue, 5 Sep 2023 12:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354555AbjIEMhN (ORCPT ); Tue, 5 Sep 2023 08:37:13 -0400 Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43CDC1AD; Tue, 5 Sep 2023 05:37:08 -0700 (PDT) Received: from localhost.localdomain (unknown [10.81.81.211]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gw.red-soft.ru (Postfix) with ESMTPSA id 276823E1A8B; Tue, 5 Sep 2023 15:37:05 +0300 (MSK) Date: Tue, 5 Sep 2023 15:37:03 +0300 From: Artem Chernyshev To: Krzysztof Kozlowski Cc: Leon Romanovsky , Potnuri Bharat Teja , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] infiniband: cxgb4: cm: Check skb value Message-ID: References: <20230904115925.261974-1-artem.chernyshev@red-soft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 179655 [Sep 05 2023] X-KLMS-AntiSpam-Version: 5.9.59.0 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 529 529 a773548e495283fecef97c3e587259fde2135fef, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;red-soft.ru:7.1.1, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2023/09/05 05:09:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/09/05 09:52:00 #21801295 X-KLMS-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 Mon, Sep 04, 2023 at 10:07:26PM +0200, Krzysztof Kozlowski wrote: > On 04/09/2023 13:59, Artem Chernyshev wrote: > > get_skb() can't allocate skb in case of OOM. > > > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > > > Signed-off-by: Artem Chernyshev > > --- > > drivers/infiniband/hw/cxgb4/cm.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c > > index ced615b5ea09..775da62b38ec 100644 > > --- a/drivers/infiniband/hw/cxgb4/cm.c > > +++ b/drivers/infiniband/hw/cxgb4/cm.c > > @@ -1965,6 +1965,10 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid) > > int win; > > > > skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); > > + if (!skb) { > > + pr_err("%s - cannot alloc skb!\n", __func__); > > I don't think we print memory allocation failures. > > Best regards, > Krzysztof > Sure, will fix that in v2 Thanks, Artem