From: Willy Tarreau Date: Fri, 10 Nov 2017 15:24:41 +0000 (+0100) Subject: BUG/MEDIUM: threads/cli: fix "show sess" locking on release X-Git-Tag: v1.8-rc3~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ce3f09513f212a6cf74560d5d228479ccf35c79;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: threads/cli: fix "show sess" locking on release The recent thread updates on the CLI broke "show sess" by unlocking the stream twice instead of lock+unlock. No backport is needed. --- diff --git a/src/stream.c b/src/stream.c index 8f81622dd4..48c4ba53d8 100644 --- a/src/stream.c +++ b/src/stream.c @@ -3252,7 +3252,7 @@ static int cli_io_handler_dump_sess(struct appctx *appctx) static void cli_release_show_sess(struct appctx *appctx) { if (appctx->st2 == STAT_ST_LIST) { - HA_SPIN_UNLOCK(STRMS_LOCK, &streams_lock); + HA_SPIN_LOCK(STRMS_LOCK, &streams_lock); if (!LIST_ISEMPTY(&appctx->ctx.sess.bref.users)) LIST_DEL(&appctx->ctx.sess.bref.users); HA_SPIN_UNLOCK(STRMS_LOCK, &streams_lock);