From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796334634; b=Sc2i/NF3bRTKMDEQkLOGp4950gvTdDg1+9zaqmY7Y9KFxxrYewDbGuYSsdvUiH8WtdHQ 2x9j1LjAHztfXoLCqlHxAw6UZPVgHCcGiZcMNDJuTSJZp2iphO0ifwzHaBuSDhlb2d/Q/ MiNpiMIwvZ1Srq+eApwQMnTDTFio7D6LTbEMyosfZRdFzd3JVD0FU0s0A4gtt3h95Fo6S rFZK//hHpp8vPG74TmVA/znuvWw6cPA3gw3VpMW46/B8RYrevqN0km083HT9EOWEpdtHO C4d4WN/fubbzjueG3aMQBuyWCR8GzLPSOvMLxTAGWTMJQzoU/UgBhUXirXjTQ7k77HA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796334634; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=; b=1+ZNa+8c7ppO5WXSaLzy6w1MPChIkwzNJt1FZBFLt7pBfmXZSaB7CWYLrE1C9MkobkO8 yi1oV/2SwSpfpNpnsXvz496R+B4+SPEhs0nJ68+riSHpSE0s90Rik90tF1WP0VLzaHKc2 d4dXjvFYS+HApAcJC1sa9VQ2Kn8B51UoCIfgao4XSIe5+qj1EZhan/aF9NX8Rryd8avvZ 6U/Jz2iT0OkWzaS0oRaAN2+fmNBuRC4KuN3iZQs3nd6A/pbsG7hKH0IUzS9QolZ9phpXD G3ZlEEVyISg3PV7OOqZA1RJJhR88e/oONbp+OB55vjbLFvGLn62no6YsSlRZwUl3sQg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stellman-greene.com; spf=none smtp.mailfrom=stellman-greene.com; dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=h+hbWXuq; arc=none smtp.remote-ip=209.85.222.169 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA1D4606A698 for ; Thu, 3 Dec 2026 21:50:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EA1D4606A698 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=h+hbWXuq Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-94a7cf5badbso40927085a.1 for ; Thu, 03 Dec 2026 13:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1796334633; x=1796939433; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=; b=h+hbWXuqWlJ7YI4Z9vX8lBpcSHfmcVklHA2yFRAr8qPPqlP4eVu14szZpneIyG9RN6 ZEwttUak8rnfL8KoPoitWnBT+8EazXQwIAF/JtodtJwl4ctYqCqpPDu3QEnzhOxi8MPm eNt+cew798Gx2mobzOZi/9SyNO/Af36OsI5ZYycUQ82pfYtooC+IjhdU4bF3/89uors/ glaFn6hzHLwDt9OcRUv0HB0cOMPhC7HlzKPUqn/g5F3Ek3wfITteX3KqWRfZrlvAqa7O qX0gnCjZJDJuf33Cs1eVsj05Oq4LbVAZsr3e6mt6NAvadySRLPfLUGMyx5a1DZUBIkYF QWOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796334633; x=1796939433; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Olyubs3VfBO0nuRTAdN57wH7vT2lPxwsfsPYc8TkMYU=; b=Kzgo1Df7w0qKkX0RnFg+aJilJEBKesIMltt3sWor3Cbs9naq2i47rGSjXQ2z2yX/AY 6I5JeBoh886yTnZIiZX+k0KSqBn57xCSFJBPqtyg9PLj2QUU+W5aDI/HlhWSteaMp06T A+vonKMJql1reperf2oCe7aqmjAmLzgI60f8khpkv2PLypC1Ur7PtJTOez3+xO3yZn6H rKP1JBUrVXCV04WxyRyMoW04ARq3K3nvACqKHkaotrxCrzYakXH3JEV6TZbPsk/mUgD4 KnhnpcC2TaN8LX8UdWq/RNkbbLF9Y6U/nqW9ocvqih/dOH/+NYZ5zeU6yQwQBM6Uyodd ufKw== X-Forwarded-Encrypted: i=1; AL+hErFZOyjrTNGlk5DBBWui0WLJ3+B4zXSTipcpINkDLkmgF0wOGGs0VtBtdeZqZnZfBLG5ReZZ9l0oefTzXRU=@vger.kernel.org X-Gm-Message-State: APuU4Z8h9XHzI4fnO2qOaYRR4GNesEeTO3PiAJ5l2dYkdAp0anhnHmD2 kVTdQT8pnrbUpJETUqPxJwKA+FfZPJ8cVixXmPOom2NrXBAgpSXWehvcG3hC98OLflS9fr+4rvF Xx1Y530U= X-Gm-Gg: AZFdTZdjBelyqcefoaNC7QuYFqyx7js3ZIUSfm7xaDmaVVhT72QlVRtuayYpui5xC1S fyvlVhmoOZ7WByR/89jI5NASqy/5vjOvHkqThB+HNCtQ/34gClwLEf73GCbtLYwlJHxXnhVptvz Lzw/Ze0LwtdQZ4XmA0u94JFsBw75D+uQjNvD+2sbYKB0vou901FG1S+uE2pA5r2jDYHF8Ox/Sxt wo/Gds5FSkYU9stwzLyS2MFCD6PLikptFrJEIkaQ7N5dN7bBEPfB/IvrWbko3evn5W2A+GIrjAu laHn9+XDzevz0+JKf52/PeRCk0HZDX9RvMj4TYf0B5r4u99VjUSYsjnoaC58i29j7LTXWbCQ82m OGA8XJLQkGyXRyvW+WkFhp6RF22/+V4aXnMc/3WpjCnpuEKS2CG/pbFJ9BMc66eg9+XTHmpfDY/ s95ydjZ3SOgPVHDiWCT9SNXK18QVGsmdPKFE8ZoTygtO7zQKJtxZKmtQXGePcuB2rnisfq38EiG eTsekx4WJrYXdE4EPLAW4eA5N7vQADJro4rQ3bdJB/l5Z8gGJwLC8X4W5+pZwYaKu3sJuDYqBsv tJLE4HFYi74H/kVFDBreoYSjN1ZEdvWAaw7/6YNNhumpwKW83g45upwEnLnNw/irLCu2YFQnmES D+Q== X-Received: by 2002:a05:620a:2556:b0:945:d6e9:9a8c with SMTP id af79cd13be357-94a82e030a9mr497685a.33.1796334632778; Thu, 03 Dec 2026 13:50:32 -0800 (PST) Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:c810:be07:df67:ac94]) by smtp.gmail.com with ESMTPSA id af79cd13be357-94a7f49daa4sm52295085a.16.2026.12.03.13.50.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 13:50:32 -0800 (PST) From: Andrew Stellman To: David Howells , Marc Dionne Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net v2] rxrpc: Do not return client slots for service calls Date: Thu, 3 Dec 2026 16:50:31 -0500 Message-ID: <20261203215031.26124-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andrew Stellman rxrpc_put_call_slot() calls up() on the client call limiter for every released call, but only client calls take a slot, in rxrpc_new_client_call(). Released service calls therefore raise the limiter's count: three completed calls to a userspace service took it from 1000 to 1003, and closing a socket with three calls precharged with RXRPC_CHARGE_ACCEPT raised it by three more. Skip the limiter release for service calls. The issue was found by Claude Opus 5.5 running Quality Playbook, an LLM-driven code review tool: https://github.com/andrewstellman/quality-playbook The fix was drafted with OpenAI GPT-6 (Codex), this changelog with OpenAI GPT-6 (Codex) and Claude Opus 5.5, and both were reviewed by me. Fixes: b7a7d6740803 ("rxrpc: Impose a maximum number of client calls") Signed-off-by: Andrew Stellman --- v1: https://lore.kernel.org/netdev/20261202181321.74079-1-bugs@stellman-greene.com/ v2: Say that completed service calls raise the count too, as Sashiko's review of v1 pointed out. No code change. Tested on net 90ae4042bd9f in arm64 QEMU with KASAN, with test-only logging of the limiter count: three loopback calls and three precharged calls took it from 1000 to 1006 on base and left it at 1000 with this fix. A reproducer is available on request. net/rxrpc/call_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 817ed9acb91e..11d4e37dbb21 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c @@ -281,6 +281,8 @@ static void rxrpc_put_call_slot(struct rxrpc_call *call) { struct semaphore *limiter = &rxrpc_call_limiter; + if (test_bit(RXRPC_CALL_IS_SERVICE, &call->flags)) + return; if (test_bit(RXRPC_CALL_KERNEL, &call->flags)) limiter = &rxrpc_kernel_call_limiter; up(limiter); -- 2.53.0