Todd Lipcon has submitted this change and it was merged.

Change subject: Fix use-after free in accessing InboundCall's MethodInfo
......................................................................


Fix use-after free in accessing InboundCall's MethodInfo

This fixes a regression from 38e16b71b881ad1f276da918cae8977a383906a5 in which
a call is being responded to after the underlying service has shut down. In
this case, the call was holding on to a raw pointer to the RpcMethodInfo
object, and that object was being destroyed when the service stopped.

The fix here is to make it reference-counted. This has a slight penalty of some
extra atomic refcount operations, but any other fix would likely be much more
complex.

No new test since client-test was already failing nearly 50% in ASAN/TSAN
builds.

Change-Id: I30304fe6bd2074578e5cfc09ee18ef616d43e687
Reviewed-on: http://gerrit.cloudera.org:8080/2833
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/rpc/inbound_call.h
M src/kudu/rpc/protoc-gen-krpc.cc
M src/kudu/rpc/service_if.h
3 files changed, 8 insertions(+), 7 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/2833
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I30304fe6bd2074578e5cfc09ee18ef616d43e687
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to