diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2018-03-09 22:48:33 +0100 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2018-03-09 23:31:29 +0100 |
commit | 157e55fe43ba13f04452aa11f42200b279fb4f7a (patch) | |
tree | 8ea7ab1685741b8236fde8a7accc611e98d73acc /xlators/protocol/client/src/client.h | |
parent | 940f870f4716f9cd32c68db95aa326a0ae87bf03 (diff) |
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.
Change-Id: If2910508bcb7d1ff23debb30291391f00903a6fe
BUG: 1553129
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client.h')
-rw-r--r-- | xlators/protocol/client/src/client.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index b51607fdc45..c3c8aaec0dc 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -246,7 +246,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 */ |