lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW5JVspgbtaAHl-v@horms.kernel.org>
Date: Mon, 19 Jan 2026 15:10:14 +0000
From: Simon Horman <horms@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: netdev@...r.kernel.org, Faith <faith@...lic.io>,
	Pumpkin Chang <pumpkin@...co.re>,
	Marc Dionne <marc.dionne@...istor.com>, Nir Ohfeld <niro@....io>,
	Willy Tarreau <w@....eu>, Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	linux-afs@...ts.infradead.org, security@...nel.org,
	stable@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] rxrpc: Fix recvmsg() unconditional requeue

On Wed, Jan 14, 2026 at 10:03:23PM +0000, David Howells wrote:

...

> diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c

...

> @@ -549,11 +550,21 @@ int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
>  error_requeue_call:
>  	if (!(flags & MSG_PEEK)) {
>  		spin_lock_irq(&rx->recvmsg_lock);
> -		list_add(&call->recvmsg_link, &rx->recvmsg_q);
> -		spin_unlock_irq(&rx->recvmsg_lock);
> -		trace_rxrpc_recvmsg(call_debug_id, rxrpc_recvmsg_requeue, 0);
> +		if (list_empty(&call->recvmsg_link)) {
> +			list_add(&call->recvmsg_link, &rx->recvmsg_q);
> +			rxrpc_see_call(call, rxrpc_call_see_recvmsg_requeue);
> +			spin_unlock_irq(&rx->recvmsg_lock);
> +		} else if (list_is_first(&call->recvmsg_link, &rx->recvmsg_q)) {
> +			spin_unlock_irq(&rx->recvmsg_lock);
> +			rxrpc_put_call(call, rxrpc_call_see_recvmsg_requeue_first);
> +		} else {
> +			list_move(&call->recvmsg_link, &rx->recvmsg_q);
> +			spin_unlock_irq(&rx->recvmsg_lock);
> +			rxrpc_put_call(call, rxrpc_call_see_recvmsg_requeue_move);
> +		}
> + 		trace_rxrpc_recvmsg(call_debug_id, rxrpc_recvmsg_requeue, 0);

Hi David,

If you need to re-spin for some other reason then please
fix the line above so only tabs are used for indentation
(a leading space seems to have sneaked in somehow).

>  	} else {
> -		rxrpc_put_call(call, rxrpc_call_put_recvmsg);
> +		rxrpc_put_call(call, rxrpc_call_put_recvmsg_peek_nowait);
>  	}
>  error_no_call:
>  	release_sock(&rx->sk);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ