summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-11-15 21:27:19 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-19 02:45:36 -0800
commitf88cd26064d7aa306720d4e4d48af9086d97fb13 (patch)
tree19a2220687c034633cdfd2729f6546634b5214c3 /xlators
parent0b8b78145b31c12fa4e44e75453531c8a278bc48 (diff)
segfault fix in posix
fd_ctx_get() was getting passed with wrong argument (type punned), and hence was getting segfaulted on 32bit systems. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 383 (glusterfs server crash on 2.0.8) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=383
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/posix/src/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index f2451a41498..fbb2dad74a1 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3088,6 +3088,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this,
int ret = 0;
int _fd = -1;
+ uint64_t tmp_pfd = 0;
struct posix_fd *pfd = NULL;
data_pair_t *trav = NULL;
@@ -3102,7 +3103,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this,
trav = xattr->members_list;
if (fd) {
- ret = fd_ctx_get (fd, this, (uint64_t *)&pfd);
+ ret = fd_ctx_get (fd, this, &tmp_pfd);
if (ret < 0) {
gf_log (this->name, GF_LOG_DEBUG,
"failed to get pfd from fd=%p",
@@ -3111,6 +3112,7 @@ do_xattrop (call_frame_t *frame, xlator_t *this,
op_errno = EBADFD;
goto out;
}
+ pfd = (struct posix_fd *)(long)tmp_pfd;
_fd = pfd->fd;
}