diff options
author | David Howells <dhowells@redhat.com> | 2024-10-01 16:26:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-10 12:58:08 +0300 |
commit | cdf4bbbdb956d7426f687f38757ebca2a2759a0f (patch) | |
tree | c850f100a4bc818e3364b22acf23e4074b9d4d42 /rust | |
parent | b538fefeb1026aad9dcdcbb410c42b56dff8aae9 (diff) | |
download | linux-cdf4bbbdb956d7426f687f38757ebca2a2759a0f.tar.xz |
rxrpc: Fix a race between socket set up and I/O thread creation
commit bc212465326e8587325f520a052346f0b57360e6 upstream.
In rxrpc_open_socket(), it sets up the socket and then sets up the I/O
thread that will handle it. This is a problem, however, as there's a gap
between the two phases in which a packet may come into rxrpc_encap_rcv()
from the UDP packet but we oops when trying to wake the not-yet created I/O
thread.
As a quick fix, just make rxrpc_encap_rcv() discard the packet if there's
no I/O thread yet.
A better, but more intrusive fix would perhaps be to rearrange things such
that the socket creation is done by the I/O thread.
Fixes: a275da62e8c1 ("rxrpc: Create a per-local endpoint receive queue and I/O thread")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: yuxuanzhe@outlook.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20241001132702.3122709-2-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions