Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6260121imu; Mon, 21 Jan 2019 06:01:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN4N63jiIFUp3pjqFaeOsawAAmf1gSOfxcNXp4KIOCG2zrNNYrI544ZItbdJgI3OVC5pt/d7 X-Received: by 2002:a63:fa06:: with SMTP id y6mr28328189pgh.177.1548079298936; Mon, 21 Jan 2019 06:01:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079298; cv=none; d=google.com; s=arc-20160816; b=d3iN1/vSHEgnlAW8qEWENLkO21zoSUZBmWRusIsldjKjRxRpreA+WkpqQPmS2IMMvN cFvxgyBK9PrH2Q0AnSHT72DhRZ2/HjeAd2H0P7cbxtadsGCDR8O4EHHqcJj+2FiXuxZl uZkYMCNOoX/WqdeDFCeqi47Oe7oFZCek4hfTIg4Tyos/BesoKghFsJAkhjJ+FNuyRj7e G7KjNKbTlrmoOuc8AxyuwstflDjxvimYcig2xVaQHRvVYCRo0bGbVq3IBKJBSV5M3/yN b4av8/QCl3dp8fgR+0xg+x7FAPmZVlBlN+49t6J0OlEHJWRbK0eccSxc4O8sIHi6NpTg 0qtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QT9CnKjvfnpj1hUcO7Z4ukoEk0ycvpEjyOrA0+lD37k=; b=VPSQ8IodJF7F2BNZ6KjM0oLnmGO8srYpY1eG+oyRjaO0ePNV3YtW73REEh9Y/2fLSj eRdd2vfzSHLf48L76xpgeQpo2kwn+A2eH4Tw/OksbXA24V98HCYTA1aML+qcU0AkBa5O +RlFCQ143MKM+xXfLrxH0oerI05TCSOEMJ0lUSiSkgqcSN7q+c5HKRhMOEQCn9hpmKoR OfJOGq6sqJzHhXWzZESh6+ykELw5HeYm4Od6ieuvZHKIbXQ4mpyrKCXbOVc6H5FqC1tE 4VRYTF9KzN97VCWQOyHk05yZaRcRweR07q3b6JOSrLo+BACqrsAHoJwZ0gL03v0u/Kq/ 8X3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bml+AUlB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t63si12510990pgd.78.2019.01.21.06.01.22; Mon, 21 Jan 2019 06:01:38 -0800 (PST) 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=@kernel.org header.s=default header.b=bml+AUlB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729450AbfAUN6s (ORCPT + 99 others); Mon, 21 Jan 2019 08:58:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:44386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732059AbfAUN6n (ORCPT ); Mon, 21 Jan 2019 08:58:43 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C509A2087F; Mon, 21 Jan 2019 13:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548079123; bh=uFAuhtd/f0/7ZyXjvSieWlZnKOhJ7igsY2fIp42nKHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bml+AUlBp90AvqFQ1+HfK9NqUSddwCSfsDFX1EjDtWZgGTMlEL73AzSbBnDWHhdDz CxbMsFAyHk+q/rrl/TOEvWaDCqRDyGmsP25O8ST6UC7f49kHDiFWXu3iAzZVtr+k8y zeSlgr8/arvDz3UUqT5G76mku4PRvyVxaGD7Iu5M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Varun Prakash , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 17/99] scsi: target: iscsi: cxgbit: fix csk leak - 2 Date: Mon, 21 Jan 2019 14:48:09 +0100 Message-Id: <20190121134914.573332050@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121134913.924726465@linuxfoundation.org> References: <20190121134913.924726465@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit ed076c55b359cc9982ca8b065bcc01675f7365f6 ] In case of arp failure call cxgbit_put_csk() to free csk. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/target/iscsi/cxgbit/cxgbit_cm.c b/drivers/target/iscsi/cxgbit/cxgbit_cm.c index 71888b979ab5..b19c960d5490 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_cm.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_cm.c @@ -641,8 +641,11 @@ static void cxgbit_send_halfclose(struct cxgbit_sock *csk) static void cxgbit_arp_failure_discard(void *handle, struct sk_buff *skb) { + struct cxgbit_sock *csk = handle; + pr_debug("%s cxgbit_device %p\n", __func__, handle); kfree_skb(skb); + cxgbit_put_csk(csk); } static void cxgbit_abort_arp_failure(void *handle, struct sk_buff *skb) @@ -1206,7 +1209,7 @@ cxgbit_pass_accept_rpl(struct cxgbit_sock *csk, struct cpl_pass_accept_req *req) rpl5->opt0 = cpu_to_be64(opt0); rpl5->opt2 = cpu_to_be32(opt2); set_wr_txq(skb, CPL_PRIORITY_SETUP, csk->ctrlq_idx); - t4_set_arp_err_handler(skb, NULL, cxgbit_arp_failure_discard); + t4_set_arp_err_handler(skb, csk, cxgbit_arp_failure_discard); cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t); } -- 2.19.1