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

prov/rxm: fix rxm multi recv getopt segfault #10725

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

soumagne
Copy link
Contributor

this prevents a segfault when the application calls fi_getopt of FI_OPT_MIN_MULTI_RECV before the endpoint gets enabled.

@soumagne
Copy link
Contributor Author

@aingerson tagging you since this fix seems related to some of your previous patches.

Comment on lines 272 to 276
case FI_OPT_MIN_MULTI_RECV:
return rxm_ep->srx->ep_fid.ops->getopt(&rxm_ep->srx->ep_fid.fid,
level, optname, optval, optlen);
assert(sizeof(rxm_ep->min_multi_recv_size) == sizeof(size_t));
*(size_t *)optval = rxm_ep->min_multi_recv_size;
*optlen = sizeof(size_t);
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both situations need to be handled, for example:

        if (rxm_ep->srx) {
                /* the old code here */
        } else {
                /* the new code here */
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok fixed

this prevents a segfault when the application calls fi_getopt
of FI_OPT_MIN_MULTI_RECV before the endpoint gets enabled.

Signed-off-by: Jerome Soumagne <[email protected]>
@j-xiong j-xiong merged commit 82e4ae8 into ofiwg:main Jan 30, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants