mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
isert-scst: Fix isert conn tx_free_list resources leak
The get and put of resources from the tx_free commands pool was not symmetric. Commands that are self issued by the target (e.g. nop outs) didn't release their resources, although they acquired them earlier. Signed-off-by: Ariel Nahum <arieln@mellanox.com> Signed-off-by: Alex Lyakas <alex@zadarastorage.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6630 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -168,8 +168,7 @@ void isert_release_rx_pdu(struct iscsi_cmnd *iscsi_pdu)
|
||||
{
|
||||
struct isert_cmnd *isert_pdu = (struct isert_cmnd *)iscsi_pdu;
|
||||
|
||||
if (likely(!isert_pdu->is_fake_rx))
|
||||
isert_rx_pdu_done(isert_pdu);
|
||||
isert_rx_pdu_done(isert_pdu);
|
||||
}
|
||||
|
||||
/* if last transition into FF (Fully Featured) state */
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#endif
|
||||
#include "isert_dbg.h"
|
||||
#include "isert.h"
|
||||
#include "iser.h"
|
||||
#include "iser_datamover.h"
|
||||
|
||||
#if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)
|
||||
@@ -211,7 +212,7 @@ static void isert_cmnd_free(struct iscsi_cmnd *cmnd)
|
||||
sBUG();
|
||||
}
|
||||
#endif
|
||||
if (cmnd->parent_req)
|
||||
if (cmnd->parent_req || ((struct isert_cmnd *)cmnd)->is_fake_rx)
|
||||
isert_release_tx_pdu(cmnd);
|
||||
else
|
||||
isert_release_rx_pdu(cmnd);
|
||||
|
||||
Reference in New Issue
Block a user