diff mbox

[net,v6,7/7] libcxgbi: free skb after debug prints

Message ID 201412101625.sBAGPSXC011110@localhost6.localdomain6
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Karen Xie Dec. 10, 2014, 4:25 p.m. UTC
[PATCH net v6 7/7] libcxgbi: free skb after debug prints

From: Karen Xie <kxie@chelsio.com>

The debug print was accessing the skb after it was freed.

Signed-off-by: Karen Xie <kxie@chelsio.com>
---
 drivers/scsi/cxgbi/libcxgbi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Sergei Shtylyov Dec. 10, 2014, 7:38 p.m. UTC | #1
Hello.

On 12/10/2014 07:25 PM, Karen Xie wrote:

> [PATCH net v6 7/7] libcxgbi: free skb after debug prints

    Please, do not duplicate the subject in the changelog -- DaveM would have 
to edit it out by hand.

> From: Karen Xie <kxie@chelsio.com>

> The debug print was accessing the skb after it was freed.

> Signed-off-by: Karen Xie <kxie@chelsio.com>

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Karen Xie Dec. 10, 2014, 8:26 p.m. UTC | #2
Thanks, v7 has been submitted to address your comment. Please review.
David Miller Dec. 10, 2014, 8:32 p.m. UTC | #3
From: Karen Xie <kxie@chelsio.com>
Date: Wed, 10 Dec 2014 20:26:59 +0000

> Thanks, v7 has been submitted to address your comment. Please review.

Sorry, you did not actually address his comments.

He said to not duplicate your Subject lines in your message bodies,
and you did not fix that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Karen Xie Dec. 10, 2014, 9:02 p.m. UTC | #4
Sorry, misread the comment, will resubmit. Thanks.

-----Original Message-----
From: David Miller [mailto:davem@davemloft.net] 
Sent: Wednesday, December 10, 2014 12:33 PM
To: Karen Xie
Cc: sergei.shtylyov@cogentembedded.com; linux-scsi@vger.kernel.org; netdev@vger.kernel.org; Hariprasad S; Anish Bhatt; hch@infradead.org; James.Bottomley@HansenPartnership.com; michaelc@cs.wisc.edu
Subject: Re: [PATCH net v6 7/7] libcxgbi: free skb after debug prints

From: Karen Xie <kxie@chelsio.com>
Date: Wed, 10 Dec 2014 20:26:59 +0000

> Thanks, v7 has been submitted to address your comment. Please review.

Sorry, you did not actually address his comments.

He said to not duplicate your Subject lines in your message bodies, and you did not fix that.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 10, 2014, 9:04 p.m. UTC | #5
From: Karen Xie <kxie@chelsio.com>
Date: Wed, 10 Dec 2014 21:02:34 +0000

> Sorry, misread the comment, will resubmit. Thanks.

Please do not top-post.

Quote the relevant material, then provide your own content
after the quoted material, not before.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 7da59c3..eb58afc 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2294,10 +2294,12 @@  int cxgbi_conn_xmit_pdu(struct iscsi_task *task)
 		return err;
 	}
 
-	kfree_skb(skb);
 	log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX,
 		"itt 0x%x, skb 0x%p, len %u/%u, xmit err %d.\n",
 		task->itt, skb, skb->len, skb->data_len, err);
+
+	kfree_skb(skb);
+
 	iscsi_conn_printk(KERN_ERR, task->conn, "xmit err %d.\n", err);
 	iscsi_conn_failure(task->conn, ISCSI_ERR_XMIT_FAILED);
 	return err;