Don't leak memory when removing an unconnected session, and remove useless
UMA_ZONE_NOFREE that caused another leak when unloading the module. Approved by: re (glebius) Sponsored by: FreeBSD Foundation
This commit is contained in:
parent
56fd486581
commit
cf59042d5a
@ -1255,7 +1255,7 @@ cfiscsi_init(void)
|
|||||||
|
|
||||||
cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait",
|
cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait",
|
||||||
sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL,
|
sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL,
|
||||||
UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
UMA_ALIGN_PTR, 0);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
@ -957,6 +957,7 @@ icl_pdu_queue(struct icl_pdu *ip)
|
|||||||
if (ic->ic_disconnecting || ic->ic_socket == NULL) {
|
if (ic->ic_disconnecting || ic->ic_socket == NULL) {
|
||||||
ICL_DEBUG("icl_pdu_queue on closed connection");
|
ICL_DEBUG("icl_pdu_queue on closed connection");
|
||||||
ICL_CONN_UNLOCK(ic);
|
ICL_CONN_UNLOCK(ic);
|
||||||
|
icl_pdu_free(ip);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next);
|
TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next);
|
||||||
@ -1259,10 +1260,10 @@ icl_load(void)
|
|||||||
|
|
||||||
icl_conn_zone = uma_zcreate("icl_conn",
|
icl_conn_zone = uma_zcreate("icl_conn",
|
||||||
sizeof(struct icl_conn), NULL, NULL, NULL, NULL,
|
sizeof(struct icl_conn), NULL, NULL, NULL, NULL,
|
||||||
UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
UMA_ALIGN_PTR, 0);
|
||||||
icl_pdu_zone = uma_zcreate("icl_pdu",
|
icl_pdu_zone = uma_zcreate("icl_pdu",
|
||||||
sizeof(struct icl_pdu), NULL, NULL, NULL, NULL,
|
sizeof(struct icl_pdu), NULL, NULL, NULL, NULL,
|
||||||
UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
UMA_ALIGN_PTR, 0);
|
||||||
|
|
||||||
refcount_init(&icl_ncons, 0);
|
refcount_init(&icl_ncons, 0);
|
||||||
}
|
}
|
||||||
|
@ -2030,7 +2030,7 @@ iscsi_load(void)
|
|||||||
|
|
||||||
iscsi_outstanding_zone = uma_zcreate("iscsi_outstanding",
|
iscsi_outstanding_zone = uma_zcreate("iscsi_outstanding",
|
||||||
sizeof(struct iscsi_outstanding), NULL, NULL, NULL, NULL,
|
sizeof(struct iscsi_outstanding), NULL, NULL, NULL, NULL,
|
||||||
UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
|
UMA_ALIGN_PTR, 0);
|
||||||
|
|
||||||
error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &iscsi_cdevsw,
|
error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &iscsi_cdevsw,
|
||||||
NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi");
|
NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user