Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1101879ybn; Wed, 25 Sep 2019 12:26:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqylo71AU6DS5fNQbEzxQa+2whMWWwSkSAekrETjpJA/k8mwdEldyskJL3g7j/pIpO+qddNp X-Received: by 2002:a50:c306:: with SMTP id a6mr4912349edb.108.1569439606045; Wed, 25 Sep 2019 12:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569439606; cv=none; d=google.com; s=arc-20160816; b=OpHEDCmxP5Eu3QBRDJ8E8oNkPQuf/U4i4dH0n9fWJ/HT6KYOu8iW3uWAxWDE7xxv8Y fAs8UyHz2RbqFDx7/1yIEaC1GrS8FpshWWv8iuiOGixNpRZcQnsJqYwR4apyFkDlyJ2O lcRl8njVFZ0XyWkA+sSrUrdguC67fbOyJmPfU5t83pq/sVYtl79K5M33X1rhOJ2gCep0 JIf50l2pL+OLM3f5g76aoxF2JReehkMIKP0rgFpTkptGiDsUb22yzroTHiqY7Q7sOKdu Gd1OHy1qNNprBNyBO3jN9kfhz0IcqRdZniTUSr/WmGibXzz/RhJ6xyKycCdotGaKLmOV 1xdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ah97PWhBQllHvUmQP5lNKcxTltHIduIyS/x+VCiBzGk=; b=WmivWMEEExsqFxha5wU1hr3lO4+AzcVQ1b9SQ1SI0WVhSbOFOBAPxxFLzHSB5K9Ete YAKlbIhFe0IpR3JuYOXo4VTCYbHGpM0vnT//h47KzhQv5L90pIJESe8kuIZfoJh4Z0R1 U2FRGSHTg4Cd5Jbh/en2y9SK8cLYvgIT5kihdN5Aoy5qcOmRMyp6eQ/8g1KV/DZwqNzG olBjFQgOFCCXYQpoEckZBb7vtdXV80zUXrGYnRXLixNuFnBgCzhAxmuPkP21V6NGijpX 5qR50LGtcW6baFrzJjbOuYRa/wJzLsI3vO+NgvyIC+6/12fHgBso9aErE0gNdd0lWcel METw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="P/TbzBez"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si4925687edf.328.2019.09.25.12.26.22; Wed, 25 Sep 2019 12:26:46 -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=@gmail.com header.s=20161025 header.b="P/TbzBez"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732845AbfIWPxS (ORCPT + 99 others); Mon, 23 Sep 2019 11:53:18 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:33771 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728464AbfIWPxS (ORCPT ); Mon, 23 Sep 2019 11:53:18 -0400 Received: by mail-io1-f66.google.com with SMTP id z19so12480561ior.0; Mon, 23 Sep 2019 08:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ah97PWhBQllHvUmQP5lNKcxTltHIduIyS/x+VCiBzGk=; b=P/TbzBez5vHy8/yao1OuiUgpxf3Qd4RJaODHAMLc4UVmKtiEiJosxcV7cmYSjs2fyn VHCKPSeu+3nIeu4R1Ez0EDXGTXbq/8swT5bIhSyA1278jBzBlu4cFlyAweACoyzCQqis r1K3szwlpCsN3a4/PPK9WIJB2l9JTr3ZkTNBC8hD6ZqF+gw9tUVvvZPji+UF6Tq1+Y+r Ls2n8QKv8X59r7DIWtgPqpgX2bBEypETlCk6yhNfwWknBM6BckJz/3PqK/D1GNQEYz6u PEP0Ah7OVyvdAr6/FbFSdDTgBr7nc3uCQMIfbXIJBTbIxAj6ClfD3VS/QS4NZ9Hrowxy qmqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ah97PWhBQllHvUmQP5lNKcxTltHIduIyS/x+VCiBzGk=; b=WJXhHZEgTa7rsdYMlHgeK69hS0TYtm28yg7P3S6KDQngVoRn+VqeIBqzpaJI2yP41M DgKt3/NcZ/ftjCIPgOek08Hj8HFI5EPhGZvyWd9RdIGbQ2bUMyr14sh3jO14SjQ1WX6+ /kRJnDSxedpsck1T3Zw82MZvWQ2w7nCd0JCebxAuhMcDrPtcel1ugAusUZMhW8tvtCog x/gXmX6pvPgfqj0CaeeCFJgKLbkwmqtuTUfRjTJf09r7DQGe0au+zqKMc2uumVK2UiEr dHcZYI+5uQQMLkz2ngg6gxHH/EKvt3v1fFWM/JBDCSnguGSMo8l07l8j+Wwsgiue3ZAf sD5Q== X-Gm-Message-State: APjAAAXuHkdBhq+Ia9HQ4b8m00Y5jndXfpXWTPfgfY4ht3lr103dyq+S 3kiYFj6sibMuDfZD3bOMQ6E= X-Received: by 2002:a5e:9e04:: with SMTP id i4mr25866429ioq.175.1569253996678; Mon, 23 Sep 2019 08:53:16 -0700 (PDT) Received: from cs-dulles.cs.umn.edu (cs-dulles.cs.umn.edu. [128.101.35.54]) by smtp.googlemail.com with ESMTPSA id c5sm8463116ioq.61.2019.09.23.08.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 08:53:16 -0700 (PDT) From: Navid Emamdoost To: leon@kernel.org Cc: emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu, Navid Emamdoost , Potnuri Bharat Teja , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] RDMA: release allocated skb Date: Mon, 23 Sep 2019 10:52:59 -0500 Message-Id: <20190923155300.20407-1-navid.emamdoost@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190923050823.GL14368@unreal> References: <20190923050823.GL14368@unreal> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In create_cq, the allocated skb buffer needs to be released on error path. Moved the kfree_skb(skb) under err4 label. Signed-off-by: Navid Emamdoost --- drivers/infiniband/hw/cxgb4/cq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index b1bb61c65f4f..1886c1af10bc 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -173,6 +173,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq, err4: dma_free_coherent(&rdev->lldi.pdev->dev, cq->memsize, cq->queue, dma_unmap_addr(cq, mapping)); + kfree_skb(skb); err3: kfree(cq->sw_queue); err2: -- 2.17.1