mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 15:40:50 +00:00
scsi: target: iscsi: cxgbit: fix csk leak
In case of arp failure call cxgbit_put_csk() to free csk. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
60a89a3ce0
commit
ed076c55b3
@ -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)
|
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);
|
pr_debug("%s cxgbit_device %p\n", __func__, handle);
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
cxgbit_put_csk(csk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cxgbit_abort_arp_failure(void *handle, struct sk_buff *skb)
|
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->opt0 = cpu_to_be64(opt0);
|
||||||
rpl5->opt2 = cpu_to_be32(opt2);
|
rpl5->opt2 = cpu_to_be32(opt2);
|
||||||
set_wr_txq(skb, CPL_PRIORITY_SETUP, csk->ctrlq_idx);
|
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);
|
cxgbit_l2t_send(csk->com.cdev, skb, csk->l2t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user