Skip to content

Commit

Permalink
DAOS-13785 gurt: protect d_log_refcount with d_log_lock
Browse files Browse the repository at this point in the history
Cherry pick to release/2.4 branch, Coverity fix for CID 1443180

Required-githooks: true

Signed-off-by: Kenneth Cain <kenneth.c.cain@intel.com>
  • Loading branch information
kccain committed Jun 21, 2023
1 parent 702c989 commit 6a56c3c
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/cart/crt_self_test_client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down
2 changes: 1 addition & 1 deletion src/client/kv/dc_kv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2017-2022 Intel Corporation.
* (C) Copyright 2017-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down
2 changes: 1 addition & 1 deletion src/control/cmd/daos_agent/fabric.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// (C) Copyright 2021-2022 Intel Corporation.
// (C) Copyright 2021-2023 Intel Corporation.
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down
2 changes: 1 addition & 1 deletion src/control/lib/spdk/spdk.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// (C) Copyright 2018-2022 Intel Corporation.
// (C) Copyright 2018-2023 Intel Corporation.
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down
2 changes: 1 addition & 1 deletion src/control/lib/spdk/spdk_default.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// (C) Copyright 2022 Intel Corporation.
// (C) Copyright 2022-2023 Intel Corporation.
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
Expand Down
5 changes: 2 additions & 3 deletions src/gurt/debug.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/gurt/dlog.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/datamover/serial_small.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
(C) Copyright 2020-2022 Intel Corporation.
(C) Copyright 2020-2023 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down
2 changes: 1 addition & 1 deletion src/tests/suite/daos_kv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down

0 comments on commit 6a56c3c

Please sign in to comment.