Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg: drop the unnecessary polling_stop() #17079

Merged
merged 1 commit into from Aug 22, 2017

Conversation

joscollin
Copy link
Member

@joscollin joscollin commented Aug 18, 2017

Drop the unnecessary polling_stop() in the ~RDMAStack(). The RDMADispatcher object contained in
RDMAStack will get distroyed when RDMAStack gets distroyed. Thus ~RDMADispatcher() will be
called automatically and executes the polling_stop().

Fixes:
The below coverity scan reports.

1. CID 1416590:  Memory - corruptions (USE_AFTER_FREE)
    Calling "~RDMADispatcher" frees pointer "this->dispatcher.rx_cq" which has already been freed.
2. CID 1416593:  Memory - illegal accesses (USE_AFTER_FREE)
    Calling "~RDMADispatcher" dereferences freed pointer "this->dispatcher.tx_cc".
3. CID 1416595:  Memory - corruptions (USE_AFTER_FREE)
    Calling "~RDMADispatcher" frees pointer "this->dispatcher.tx_cq" which has already been freed.
4. CID 1416597:  Memory - illegal accesses (USE_AFTER_FREE)
    Calling "~RDMADispatcher" dereferences freed pointer "this->dispatcher.rx_cc".

Signed-off-by: Jos Collin jcollin@redhat.com

Drop the unnecessary polling_stop() in the ~RDMAStack(). The RDMADispatcher object contained in
RDMAStack will get distroyed when RDMAStack gets distroyed. Thus ~RDMADispatcher() will be
called automatically and executes the polling_stop().

Fixes:
The below coverity scan reports.
1. CID 1416590:  Memory - corruptions
2. CID 1416593:  Memory - illegal accesses
3. CID 1416595:  Memory - corruptions
4. CID 1416597:  Memory - illegal accesses

Signed-off-by: Jos Collin <jcollin@redhat.com>
@joscollin joscollin changed the title msg: drop unnecessary polling_stop() msg: drop the unnecessary polling_stop() Aug 18, 2017
@joscollin
Copy link
Member Author

@yuyuyu101
You have created #17080. I think we were working on the same issue in parallel. So please review this PR. Thanks.

@yuriw yuriw merged commit 294dec3 into ceph:master Aug 22, 2017
@joscollin joscollin deleted the wip-use-after-free branch August 23, 2017 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants