Permalink
Browse files

Don't leak memory when removing an unconnected session, and remove us…

…eless

UMA_ZONE_NOFREE that caused another leak when unloading the module.

Approved by:	re (glebius)
Sponsored by:	FreeBSD Foundation
  • Loading branch information...
1 parent 56fd486 commit cf59042d5a28df352e229b74095717665e24e29c @trasz trasz committed Oct 4, 2013
Showing with 5 additions and 4 deletions.
  1. +1 −1 sys/cam/ctl/ctl_frontend_iscsi.c
  2. +3 −2 sys/dev/iscsi/icl.c
  3. +1 −1 sys/dev/iscsi/iscsi.c
@@ -1255,7 +1255,7 @@ cfiscsi_init(void)
cfiscsi_data_wait_zone = uma_zcreate("cfiscsi_data_wait",
sizeof(struct cfiscsi_data_wait), NULL, NULL, NULL, NULL,
- UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
+ UMA_ALIGN_PTR, 0);
return (0);
View
@@ -957,6 +957,7 @@ icl_pdu_queue(struct icl_pdu *ip)
if (ic->ic_disconnecting || ic->ic_socket == NULL) {
ICL_DEBUG("icl_pdu_queue on closed connection");
ICL_CONN_UNLOCK(ic);
+ icl_pdu_free(ip);
return;
}
TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next);
@@ -1259,10 +1260,10 @@ icl_load(void)
icl_conn_zone = uma_zcreate("icl_conn",
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",
sizeof(struct icl_pdu), NULL, NULL, NULL, NULL,
- UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
+ UMA_ALIGN_PTR, 0);
refcount_init(&icl_ncons, 0);
}
View
@@ -2030,7 +2030,7 @@ iscsi_load(void)
iscsi_outstanding_zone = uma_zcreate("iscsi_outstanding",
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,
NULL, UID_ROOT, GID_WHEEL, 0600, "iscsi");

0 comments on commit cf59042

Please sign in to comment.