From 2bb0623cfbeca29264a1b8102c738851fa0d9202 Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Fri, 9 Mar 2018 22:48:33 +0100 Subject: protocol/client: fix memory corruption There was an issue when some accesses to saved_fds list were protected by the wrong mutex (lock instead of fd_lock). Additionally, the retrieval of fdctx from fd's context and any checks done on it have also been protected by fd_lock to avoid fdctx to become outdated just after retrieving it. Backport of: > BUG: 1553129 Change-Id: If2910508bcb7d1ff23debb30291391f00903a6fe BUG: 1554235 Signed-off-by: Xavi Hernandez --- xlators/protocol/client/src/client.h | 1 - 1 file changed, 1 deletion(-) (limited to 'xlators/protocol/client/src/client.h') diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index 207c778c20c..e098ee5b979 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -248,7 +248,6 @@ typedef struct _client_fd_ctx { char released; int32_t flags; fd_lk_ctx_t *lk_ctx; - pthread_mutex_t mutex; uuid_t gfid; void (*reopen_done)(struct _client_fd_ctx*, int64_t rfd, xlator_t *); struct list_head lock_list; /* List of all granted locks on this fd */ -- cgit