Thread (20 messages) 20 messages, 5 authors, 2021-12-07

Re: [PATCH net-next 03/10] mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls

flat view

From: Paolo Abeni <pabeni@redhat.com>
Date: 2021-12-07 10:30:49
Also in: mptcp

Hello,

On Mon, 2021-12-06 at 17:16 -0800, Jakub Kicinski wrote:
On Fri,  3 Dec 2021 14:35:34 -0800 Mat Martineau wrote:
quoted
+		if (sk->sk_state == TCP_LISTEN)
+			return -EINVAL;
+
+		lock_sock(sk);
+		__mptcp_move_skbs(msk);
+		answ = mptcp_inq_hint(sk);
+		release_sock(sk);
The raciness is not harmful here?
Thank you for the careful review!

AFAICS the race between the socket state test and the receive queue
lenght estimate is not harmful: if a socket is concurrently
disconnected and moved to a listen status, mptcp_inq_hint() will return
0, as plain TCP would do in the same scenario - all the fields accessed
by __mptcp_move_skbs() and mptcp_inq_hint() will be in a consistant
status (modulo unknown bugs).

Cheers,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help