diff options
author | Varun Prakash <varun@chelsio.com> | 2017-10-11 16:03:21 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-11 20:26:49 +0200 |
commit | 2269848386c4b8395bc67eaaf7d08011da7c07ef (patch) | |
tree | 5bfdb300156c62f189890dc004f2b19a62461a26 /drivers/scsi/cxgbi/libcxgbi.h | |
parent | scsi: cxgb4i: fix Tx skb leak (diff) | |
download | linux-2269848386c4b8395bc67eaaf7d08011da7c07ef.tar.xz linux-2269848386c4b8395bc67eaaf7d08011da7c07ef.zip |
scsi: libcxgbi: simplify task->hdr allocation for mgmt cmds
In case of mgmt cmds, task->hdr is dereferenced after transmitting the
pdu in iscsi_tcp_task_xmit(). To handle this case current code
increments the Tx skb reference count and frees the skb in
cxgbi_cleanup_task(). In some error cases this results in skb leak.
To fix this in case of mgmt cmds, allocate a separate buffer for iSCSI
hdr and free this buffer in cxgbi_cleanup_task().
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi/libcxgbi.h')
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index 31a5816c2e8d..dcb190e75343 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h @@ -205,7 +205,6 @@ enum cxgbi_skcb_flags { SKCBF_TX_NEED_HDR, /* packet needs a header */ SKCBF_TX_MEM_WRITE, /* memory write */ SKCBF_TX_FLAG_COMPL, /* wr completion flag */ - SKCBF_TX_DONE, /* skb tx done */ SKCBF_RX_COALESCED, /* received whole pdu */ SKCBF_RX_HDR, /* received pdu header */ SKCBF_RX_DATA, /* received pdu payload */ |