Date: Mon, 4 Dec 2017 09:51:08 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326519 - stable/11/sys/dev/iser Message-ID: <201712040951.vB49p87b091428@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Dec 4 09:51:08 2017 New Revision: 326519 URL: https://svnweb.freebsd.org/changeset/base/326519 Log: MFC r326058: Make sure all initialized mutexes are destroyed in the iser module, else WITNESS will panic. Prefix all mutex names with "iser_" to prevent future WITNESS issues. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/iser/icl_iser.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iser/icl_iser.c ============================================================================== --- stable/11/sys/dev/iser/icl_iser.c Mon Dec 4 09:48:55 2017 (r326518) +++ stable/11/sys/dev/iser/icl_iser.c Mon Dec 4 09:51:08 2017 (r326519) @@ -257,9 +257,9 @@ iser_new_conn(const char *name, struct mtx *lock) cv_init(&iser_conn->up_cv, "iser_cv"); sx_init(&iser_conn->state_mutex, "iser_conn_state_mutex"); - mtx_init(&iser_conn->ib_conn.beacon.flush_lock, "flush_lock", NULL, MTX_DEF); + mtx_init(&iser_conn->ib_conn.beacon.flush_lock, "iser_flush_lock", NULL, MTX_DEF); cv_init(&iser_conn->ib_conn.beacon.flush_cv, "flush_cv"); - mtx_init(&iser_conn->ib_conn.lock, "lock", NULL, MTX_DEF); + mtx_init(&iser_conn->ib_conn.lock, "iser_lock", NULL, MTX_DEF); ic = &iser_conn->icl_conn; ic->ic_lock = lock; @@ -277,6 +277,7 @@ iser_conn_free(struct icl_conn *ic) struct iser_conn *iser_conn = icl_to_iser_conn(ic); iser_conn_release(ic); + mtx_destroy(&iser_conn->ib_conn.lock); cv_destroy(&iser_conn->ib_conn.beacon.flush_cv); mtx_destroy(&iser_conn->ib_conn.beacon.flush_lock); sx_destroy(&iser_conn->state_mutex); @@ -512,7 +513,7 @@ icl_iser_load(void) /* device init is called only after the first addr resolution */ sx_init(&ig.device_list_mutex, "global_device_lock"); INIT_LIST_HEAD(&ig.device_list); - mtx_init(&ig.connlist_mutex, "global_conn_lock", NULL, MTX_DEF); + mtx_init(&ig.connlist_mutex, "iser_global_conn_lock", NULL, MTX_DEF); INIT_LIST_HEAD(&ig.connlist); sx_init(&ig.close_conns_mutex, "global_close_conns_lock");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712040951.vB49p87b091428>