Re: [PATCH liburing 1/2] test/send_recvmsg: Preserve msghdr until op_recvmsg completes
Gabriel Krisman Bertazi <[email protected]> Wed, 22 Jul 2026 14:24:55 -0400
| Newsgroups | org.kernel.vger.io-uring |
|---|---|
| Organization | SUSE |
| Message-ID | <[email protected]> |
Gabriel Krisman Bertazi <[email protected]> writes: > msghdr is allocated on the stack at recv_prep, which means it may go out > of scope before the kernel has a chance to complete the operation. This > results in spurious test failures when we reach far enough into recv_fn > to reuse the stack space before op_recvmsg executes. I found it easily > reproducible when compiling with '-O0 -g3' to avoid gcc from optimizing > further local variables out of the stack. In hindsight, I should clarify that by 'test failure' I mean a segmentation fault in the testcase, not a T_EXIT_FAIL. Should have put that in the commit message. -- Gabriel Krisman Bertazi