diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-09-18 19:49:10 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <pkalever@redhat.com> | 2017-09-19 04:07:48 +0000 |
commit | 3d0953aa99eed434a1977de3131b264c48fca64b (patch) | |
tree | bcf3008e0ced0365069a9414ee4efc85e0f96b09 /Makefile.am | |
parent | 2ab382593a3dea2e6ca2dc213bf735574933c10b (diff) |
rpc: switch to MT-safe block RPC routines
blockResponse *
block_delete_1(blockDelete *argp, CLIENT *clnt)
{
static blockResponse clnt_res; <<<<<<-------- Same memory is used by everyone
memset((char *)&clnt_res, 0, sizeof(clnt_res)); <<<<<---- Here memset is happening
if (clnt_call (clnt, BLOCK_DELETE,
(xdrproc_t) xdr_blockDelete, (caddr_t) argp,
(xdrproc_t) xdr_blockResponse, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res); <<<<<---- ptr to this memory is returned.
}
So while Thread-1 is returned "return (&clnt_res);" another thread could be
doing "memset((char *)&clnt_res, 0, sizeof(clnt_res));"
This seem to be a day-1 gluster-blockd bug from the looks of it.
Change-Id: I3fc76d7814c4fe5b286577586ec44d752dcc73f0
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'Makefile.am')
0 files changed, 0 insertions, 0 deletions