From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F385C3AB288 for ; Tue, 6 Oct 2026 13:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791293470; cv=none; b=YGzQm6XahxeJ2OY635jOIgMa1CknvsY3ITvN+VnyY12uimumYVN3eV7GnMCMBQPVnEU0K2oFz5dp19oj7mj/BF9QsEWmzOvKPuUCeTQyq9cCip1ZL76p3z4m83tu/mpDJ78q/mA/DSU2qgiKHrx8YGPyO/bO+DAhzrhvgMpXjPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791293470; c=relaxed/simple; bh=R+vDyZMcwZtPeSYXp7LPR+k2Zxh6L5h6f3+A0yiEABM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qC+kUbM7vtz3vVnaJ0R/9FzbDMkDsa2gAZ/tipIL4sGV9d4QRXXFATUlab+ev5OmZuQDjJSNF0ERuoR1bqpqFjo/gOq7grPWddL+3pMNQit6ntqu/98JTiZ0POHmqrJPz9dD/QNCARAg1pfUZIzxw/kQ4rV+HHUDocB1SZLuZJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XBQYJbaq; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XBQYJbaq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791293467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BRwiUko/ZuIdCZgQfYPgdfiRngNwWLuc9cEVQ2YL2IE=; b=XBQYJbaqgYVqwWPyGWf+eR848vcceu1OmcHZnXHtLxQ63IYHIwP+ziNLZhN40aVyqVcYWc we6HE0r7O4VnUHCUi4C8JaW/0Xl/O8sFsExnethAEMNRB4kCcx9gQxbwsGPSD6tymkX2uh GobMhTD00rzBCIyLc+nK1ACazgpx3Zw= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-267--CJs6WgSOcubJ61OV6im5A-1; Tue, 06 Oct 2026 09:31:05 -0400 X-MC-Unique: -CJs6WgSOcubJ61OV6im5A-1 X-Mimecast-MFC-AGG-ID: -CJs6WgSOcubJ61OV6im5A_1791293461 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A8D01913237; Tue, 6 Oct 2026 13:31:00 +0000 (UTC) Received: from warthog.com (unknown [10.44.32.90]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5D3BE1800361; Tue, 6 Oct 2026 13:30:57 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Marc Dionne , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, stable@kernel.org Subject: [PATCH net v12 08/15] rxrpc: Fix double IRQ enablement Date: Tue, 6 Oct 2026 14:30:00 +0100 Message-ID: <20261006133011.531806-9-dhowells@redhat.com> In-Reply-To: <20261006133011.531806-1-dhowells@redhat.com> References: <20261006133011.531806-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 rxrpc_notify_socket() explicitly disables and then re-enables IRQs, but one of its call chains (rxrpc_input_queue_data() -> rxrpc_end_rx_phase() -> rxrpc_call_completed() -> rxrpc_set_call_completion()) has IRQs disabled around it. Fix this by making rxrpc_notify_socket() use irqsave spinlocks. Fixes: a2ea9a907260 ("rxrpc: Use irq-disabling spinlocks between app and I/O thread") Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260812110129.979970-6-dhowells@redhat.com Signed-off-by: David Howells cc: Marc Dionne cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@kernel.org --- net/rxrpc/recvmsg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index efcba4b2e74f..56fa324d0962 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -24,6 +24,7 @@ void rxrpc_notify_socket(struct rxrpc_call *call) { struct rxrpc_sock *rx; struct sock *sk; + unsigned long flags; _enter("%d", call->debug_id); @@ -38,16 +39,16 @@ void rxrpc_notify_socket(struct rxrpc_call *call) sk = &rx->sk; if (rx && sk->sk_state < RXRPC_CLOSE) { if (call->notify_rx) { - spin_lock_irq(&call->notify_lock); + spin_lock_irqsave(&call->notify_lock, flags); call->notify_rx(sk, call, call->user_call_ID); - spin_unlock_irq(&call->notify_lock); + spin_unlock_irqrestore(&call->notify_lock, flags); } else { - spin_lock_irq(&rx->recvmsg_lock); + spin_lock_irqsave(&rx->recvmsg_lock, flags); if (list_empty(&call->recvmsg_link)) { rxrpc_get_call(call, rxrpc_call_get_notify_socket); list_add_tail(&call->recvmsg_link, &rx->recvmsg_q); } - spin_unlock_irq(&rx->recvmsg_lock); + spin_unlock_irqrestore(&rx->recvmsg_lock, flags); if (!sock_flag(sk, SOCK_DEAD)) { _debug("call %ps", sk->sk_data_ready);