Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1471796rdb; Mon, 4 Sep 2023 15:42:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/xPp97AautE+1waYei3MVn50Qw7lsD1Go87JePDuw4XE/YxNCTQwyFPzO1MMpOe0MfvB5 X-Received: by 2002:a05:6300:8095:b0:14d:6309:fc94 with SMTP id ap21-20020a056300809500b0014d6309fc94mr12060021pzc.36.1693867359085; Mon, 04 Sep 2023 15:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693867359; cv=none; d=google.com; s=arc-20160816; b=wz25Hi5WozXh+S7w3Fe7IHFgIICVnxG5JgGwLT4jnvp6gTr/EZcWpS3ZL0VvmNJ5XN RAgje7EkTHvxpUVSmHBfpZ3VIRkwGQ5bXEvK8c9O6sUylRdi+ZDQ95In+tWp+Xx5e6mT DByDqAkyRt3WQVNaSQ9bAsRmkQ3KHYgH0qb8BYtTwZjjINzDVySrFKP4sJzPyi2N0I7L UhHeIA5/IeDvVexWng62+oXFoWa2/Z6qn+AU3IMHdAhBdHS+fWXuyrmhg7Yg5QIBk0vs TdMrpwtoFQ10WMidSTqe/awwKQoBppFeQXJ+4J2jJburqNjtbPL0fFrvBOBnE3zF5dzS SbDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BQ9gkAZyzuA8scv9js2Dx+yJxwN3J0CJOyAikapOQls=; fh=3RGZmbwuNwDgwW3hOcp5VFdAlNOGuG1l5hkQgOMqbDk=; b=QmtFHj4KlfqWUy7GyQKfRJBSF7brVdDDxOyduWzF7aJ6YKmJPoxxG2sHSI1N1a2i5R rUMjIIiQwnuqzRun+8jmxa8KrMy9S85X2yzm15DmzM1wHoHJ6lgFHqTSze5EqKjGGuhc CZloRT/EWvlXAFLfOVLj7LZlvd/sqrDt3QzVmr5VilMXWxzLeKYeUhOETKbqKRRscs4b /bNOEFNt41kwu22A5wDiTacNZm/0wx//KJ7HaLl5E/vCvAEPFIoICxV5qBM2YuoXbzLI 08aBzpePIBiLQJ80pw4Bh9k48tjHkQbxDxIMwjadGtwGjlKOhzutSDMsW+5EJgFgN6du IY8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bb0fQ8Bp; 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 q1-20020a63d601000000b0056a95d13778si8375361pgg.293.2023.09.04.15.42.26; Mon, 04 Sep 2023 15:42:39 -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=@kernel.org header.s=k20201202 header.b=Bb0fQ8Bp; 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 S233682AbjIDUHg (ORCPT + 99 others); Mon, 4 Sep 2023 16:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbjIDUHf (ORCPT ); Mon, 4 Sep 2023 16:07:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F34D4100; Mon, 4 Sep 2023 13:07:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90C14619D7; Mon, 4 Sep 2023 20:07:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2785BC433C9; Mon, 4 Sep 2023 20:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693858052; bh=otNGsPgRSJF+GJWAh44zBy59QOwduMh71EusH+v9EH8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Bb0fQ8Bp2MykA3GLRHCBMvGzsmj3KxpkioZtTjMLXduT5ih5d59gJQ77WvZq+a4Um 2sRxGMhgUplOQ6qFiI6sNK8by8z1RQkufhyCWeFb7lXWIJwsbPh9kdcUTZqGXbP4fb gVa2hZa6mXzEymue7ZP2Y8diBuYSH43spq5nsqX04mrkHz8Rdzy2x3o60vuBe9Go98 gp8wTrnrQgkF69gbqSlvBY4cL9Y7/csO1te4yx7f+kvmsFZY5EuVfWfgPbqnnc/8L1 A/K+jTJNO8GqbqLAfl+Eyo4HKoOMciPSfSmpuBQSU6++lis9/+bbCSLQr8x+p7cW10 1c5SeiXbNVEmw== Message-ID: Date: Mon, 4 Sep 2023 22:07:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] infiniband: cxgb4: cm: Check skb value Content-Language: en-US To: Artem Chernyshev , Leon Romanovsky Cc: Potnuri Bharat Teja , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20230904115925.261974-1-artem.chernyshev@red-soft.ru> From: Krzysztof Kozlowski In-Reply-To: <20230904115925.261974-1-artem.chernyshev@red-soft.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 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