diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2014-01-09 20:22:58 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendra@redhat.com> | 2014-01-13 10:23:39 +0530 |
commit | bae3b86cc44adb43fb70f674da1d9e31c60bba96 (patch) | |
tree | 99a14ea82cd339a1b80478e5d70e63f2eef65313 /xlators/mgmt/glusterd | |
parent | 847e14ccbaddd5d1f06f9200cba063ee007199ad (diff) |
protocol/server: copy the response into the payload instead of using the pointer
The response structure filled up in server_submit_reply is local to the
function (i.e stack allocated) whose address is stored in the barrier
payload to use later while sending the replies. But after the function
is exited (server_submit_reply) the pointer is not valid and contains
invalid data, which either leads in a segfault due to illegal memory
access or reply not being sent as the total length of the reply obtained
from that memory might not be valid.
So instead of saving the pointer inside the payload, save the complete
reply itself.
Change-Id: I7d0b7b181584865199357a67165b99bf35def5ab
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
0 files changed, 0 insertions, 0 deletions