From d0cb5cbaff22ec5fcb685a327d6d54e5ae8d87f2 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Thu, 9 Apr 2020 13:08:23 +0530 Subject: test: tests/bugs/rpc/bug-847624.t is crashed Problem: glusterfs(GNFS) is crashing at the time of handling Pollerr event in rpcsvc_drc_client_unref.GNFS is crashed because ref was 0 at the time of unref and ref was taken while Pollin event successfully handled. Solution: Convert drc_client ref to atomic ref to avoid the crash Change-Id: Ia4c054f2f388032a5cd99597d0cfa18b003ca690 Fixes: #1038 Signed-off-by: Mohit Agrawal --- rpc/rpc-lib/src/rpc-drc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpc-drc.h') diff --git a/rpc/rpc-lib/src/rpc-drc.h b/rpc/rpc-lib/src/rpc-drc.h index 6aaede0828a..ce66430809b 100644 --- a/rpc/rpc-lib/src/rpc-drc.h +++ b/rpc/rpc-lib/src/rpc-drc.h @@ -24,7 +24,7 @@ struct drc_client { struct rb_table *rbtree; /* no. of ops currently cached */ uint32_t op_count; - uint32_t ref; + gf_atomic_uint32_t ref; struct list_head client_list; }; -- cgit