summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2012-07-10 10:19:16 -0400
committerVijay Bellur <vbellur@redhat.com>2012-08-03 03:54:50 -0700
commit0c1cee625818275dd1b3f6718bd246d2e30dabd1 (patch)
tree9e48928d26b77909ce021eccaba397628b5eef50 /glusterfsd
parentf1a0ec826be94f2d0413dd819fd7033c437843f9 (diff)
calls to dict_allocate_and_serialize() are not 64-bit clean
All calls to dict_allocate_and_serialize() pass the address of a 32-bit type, but must cast it to the 64-bit pointer type (size_t *). This happens to work on LE machines, but even if it's apparently benign, it's still a bug. On BE machines it is not benign. GF_PROTOCOL_DICT_SERIALIZE() hacks around it by creating a size_t temp var, but that's, well, a hack, IMO when you consider that all the callers are actually passing &<u_int>; the param should just be a u_int * and eliminate the buggy casts and the temp var in the macro. Nobody apparently uses the Fedora/EPEL PPC RPMs, but they might. People are trying to build gluster.org bits on SPARC and tripping over this. Change-Id: I92ea139f9e3e91ddbbb32a51b96fa582a9515626 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 838928 Reviewed-on: http://review.gluster.com/3643 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index f313fa4c630..fb1619bc512 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -184,7 +184,7 @@ glusterfs_terminate_response_send (rpcsvc_request_t *req, int op_ret)
if (dict)
ret = dict_allocate_and_serialize (dict, &rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
if (ret == 0)
@@ -226,7 +226,7 @@ glusterfs_translator_info_response_send (rpcsvc_request_t *req, int ret,
if (output) {
ret = dict_allocate_and_serialize (output,
&rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
}
if (!ret)
free_ptr = _gf_true;
@@ -318,7 +318,7 @@ glusterfs_xlator_op_response_send (rpcsvc_request_t *req, int op_ret,
if (output) {
ret = dict_allocate_and_serialize (output,
&rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
}
if (!ret)
free_ptr = _gf_true;
@@ -904,7 +904,7 @@ glusterfs_handle_brick_status (rpcsvc_request_t *req)
rsp.op_errstr = "";
ret = dict_allocate_and_serialize (output, &rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"Failed to serialize output dict to rsp");
@@ -1088,7 +1088,7 @@ glusterfs_handle_node_status (rpcsvc_request_t *req)
rsp.op_errstr = "";
ret = dict_allocate_and_serialize (output, &rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR,
"Failed to serialize output dict to rsp");
@@ -1186,7 +1186,7 @@ glusterfs_handle_nfs_profile (rpcsvc_request_t *req)
rsp.op_errstr = "";
ret = dict_allocate_and_serialize (output, &rsp.output.output_val,
- (size_t *)&rsp.output.output_len);
+ &rsp.output.output_len);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR,
"Failed to serialize output dict to rsp");
@@ -1748,7 +1748,7 @@ glusterfs_rebalance_event_notify (dict_t *dict)
gf_log ("", GF_LOG_ERROR, "failed to set volname");
ret = dict_allocate_and_serialize (dict, &req.dict.dict_val,
- (size_t *)&req.dict.dict_len);
+ &req.dict.dict_len);
}
ret = mgmt_submit_request (&req, frame, ctx, &clnt_handshake_prog,