[PATCH net v1] rxrpc: fix io_thread race in rxrpc_wake_up_io_thread()

Simon Horman horms at kernel.org
Wed Jul 15 04:43:15 PDT 2026


On Wed, Jul 08, 2026 at 05:35:34PM +0800, xuanqiang.luo at linux.dev wrote:
> From: Xuanqiang Luo <luoxuanqiang at kylinos.cn>
> 
> rxrpc_wake_up_io_thread() checks local->io_thread before waking it, but
> then reloads the pointer for wake_up_process().
> 
> local->io_thread is cleared with WRITE_ONCE() when the I/O thread exits, so
> the second load can see NULL even if the first load did not.
> 
> Take a READ_ONCE() snapshot and use it for both the NULL check and the
> wake_up_process() call, as rxrpc_encap_rcv() already does.
> 
> Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE")
> Signed-off-by: Xuanqiang Luo <luoxuanqiang at kylinos.cn>

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the linux-afs mailing list