projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2126bc5
)
libcxgbi: fix freeing skb prematurely
author
Karen Xie
<
[email protected]
>
Fri, 12 Dec 2014 03:13:47 +0000
(19:13 -0800)
committer
David S. Miller
<
[email protected]
>
Fri, 12 Dec 2014 16:22:30 +0000
(11:22 -0500)
With debug turned on the debug print would access the skb after it is freed.
Fix it to free the skb after the debug print.
Signed-off-by: Karen Xie <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/scsi/cxgbi/libcxgbi.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/cxgbi/libcxgbi.c
b/drivers/scsi/cxgbi/libcxgbi.c
index 7da59c38a69ec97cf15507876122151222e52fe1..eb58afcfb73b4c7bbff39a33da272ab9d52e1c39 100644
(file)
--- 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;