From 6a56c3c8d1204b9b8e21be2fed6dbdcf1485dbcd Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Wed, 21 Jun 2023 11:13:51 -0400 Subject: [PATCH] DAOS-13785 gurt: protect d_log_refcount with d_log_lock Cherry pick to release/2.4 branch, Coverity fix for CID 1443180 Required-githooks: true Signed-off-by: Kenneth Cain --- src/cart/crt_self_test_client.c | 2 +- src/client/kv/dc_kv.c | 2 +- src/control/cmd/daos_agent/fabric.go | 2 +- src/control/lib/spdk/spdk.go | 2 +- src/control/lib/spdk/spdk_default.go | 2 +- src/gurt/debug.c | 5 ++--- src/gurt/dlog.c | 2 +- src/tests/ftest/datamover/serial_small.py | 2 +- src/tests/suite/daos_kv.c | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/cart/crt_self_test_client.c b/src/cart/crt_self_test_client.c index 71ab7a6d3cff..33aa437714f8 100644 --- a/src/cart/crt_self_test_client.c +++ b/src/cart/crt_self_test_client.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016-2022 Intel Corporation. + * (C) Copyright 2016-2023 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ diff --git a/src/client/kv/dc_kv.c b/src/client/kv/dc_kv.c index 3924c48c04b7..da1f31b94547 100644 --- a/src/client/kv/dc_kv.c +++ b/src/client/kv/dc_kv.c @@ -1,5 +1,5 @@ /** - * (C) Copyright 2017-2022 Intel Corporation. + * (C) Copyright 2017-2023 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ diff --git a/src/control/cmd/daos_agent/fabric.go b/src/control/cmd/daos_agent/fabric.go index d2f7870f47c5..ff05ecbf6fd2 100644 --- a/src/control/cmd/daos_agent/fabric.go +++ b/src/control/cmd/daos_agent/fabric.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2021-2022 Intel Corporation. +// (C) Copyright 2021-2023 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // diff --git a/src/control/lib/spdk/spdk.go b/src/control/lib/spdk/spdk.go index 062ac719ad90..fec4e29e3856 100644 --- a/src/control/lib/spdk/spdk.go +++ b/src/control/lib/spdk/spdk.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2018-2022 Intel Corporation. +// (C) Copyright 2018-2023 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // diff --git a/src/control/lib/spdk/spdk_default.go b/src/control/lib/spdk/spdk_default.go index 77f382f0268e..e501f957e88e 100644 --- a/src/control/lib/spdk/spdk_default.go +++ b/src/control/lib/spdk/spdk_default.go @@ -1,5 +1,5 @@ // -// (C) Copyright 2022 Intel Corporation. +// (C) Copyright 2022-2023 Intel Corporation. // // SPDX-License-Identifier: BSD-2-Clause-Patent // diff --git a/src/gurt/debug.c b/src/gurt/debug.c index 960db55b0016..9df01c1b252d 100644 --- a/src/gurt/debug.c +++ b/src/gurt/debug.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016-2022 Intel Corporation. + * (C) Copyright 2016-2023 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -560,9 +560,8 @@ d_log_init(void) void d_log_fini(void) { - D_ASSERT(d_log_refcount > 0); - D_MUTEX_LOCK(&d_log_lock); + D_ASSERT(d_log_refcount > 0); d_log_refcount--; if (d_log_refcount == 0) { cleanup_dbg_namebit(); diff --git a/src/gurt/dlog.c b/src/gurt/dlog.c index 430ddbfbec7c..0b3d2335dd2d 100644 --- a/src/gurt/dlog.c +++ b/src/gurt/dlog.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016-2022 Intel Corporation. + * (C) Copyright 2016-2023 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ diff --git a/src/tests/ftest/datamover/serial_small.py b/src/tests/ftest/datamover/serial_small.py index afae5e76451b..bea026551209 100644 --- a/src/tests/ftest/datamover/serial_small.py +++ b/src/tests/ftest/datamover/serial_small.py @@ -1,5 +1,5 @@ ''' - (C) Copyright 2020-2022 Intel Corporation. + (C) Copyright 2020-2023 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent ''' diff --git a/src/tests/suite/daos_kv.c b/src/tests/suite/daos_kv.c index 701c5cc2edea..b5910d0a2829 100644 --- a/src/tests/suite/daos_kv.c +++ b/src/tests/suite/daos_kv.c @@ -1,5 +1,5 @@ /** - * (C) Copyright 2016-2022 Intel Corporation. + * (C) Copyright 2016-2023 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */