From nobody Thu Mar 24 17:24:22 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 63D3A1A35B92; Thu, 24 Mar 2022 17:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KPXCB2KMNz3JKQ; Thu, 24 Mar 2022 17:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648142662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqeAXYtxQhhYUlMtWWRateV3AkUUyyo2+rhd1RAqLlg=; b=DFPxSTM4I51IosAgNVaod0lAofMqJPyCB1nrv5Vjhzbl7uRQgapnp6dhNyisOalGCrGWDx PxL9/jqkRlbJPXwZPmK0CANgOOttTe+SWHUoMByItwtPzV1n8CaJwjYLsGdGuM3JDyZub9 GSzT5w1GlC1sFlnm6TEtdsHqsCIhhHN+XenGJVvBJXU4lr0EKCNciJ13SPB7b9v7PezqL8 HnZu2QSSC8wjH6JyS2u8W/rk4IPOnrJIVeVOYHZJnE8MtsLEPtAko1A75ai03VM2TANitu Pny0CaovKSR9Ca1erlxmJkunZvVGMg7T9QVMEfD3nZxwFSpul6coHAR0yFwoMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3000B1C224; Thu, 24 Mar 2022 17:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22OHOMbG072983; Thu, 24 Mar 2022 17:24:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22OHOMBG072982; Thu, 24 Mar 2022 17:24:22 GMT (envelope-from git) Date: Thu, 24 Mar 2022 17:24:22 GMT Message-Id: <202203241724.22OHOMBG072982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 26714a5fa2c6 - releng/13.1 - Allow kern.ipc.maxsockets to be set to current value without error List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 26714a5fa2c650f530b4977f1a005bad5f875567 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648142662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqeAXYtxQhhYUlMtWWRateV3AkUUyyo2+rhd1RAqLlg=; b=EwfafL07mzwIkawv7b38o5ZMQ5DA6KXrpT+RXJiC9PAC7VuX/hrgS4jnFCN/XDCm88X6PY hVGQYoE4tEMV8CygEoAX8ULySWigGCCzkCW/QyY45zUzrPxDn4t0ZkFP9g2kTe0xKdQNdk m1mpH3jFfEvVfe/zIRkFKpDprvszM+PYZBk7sNEm24CriFmDvQPAMQGUQg3+zSiPz1bcXS IqaIncKY4bs35tqNlHKhiEepOMtyU1Ky3PVu/NaDnO0CfZ6Tymo5wir8PpsqpELQE61FdX bVEhx4OCQNItZd+Nyr8M1Ly9jfZ7nocZ2u/AVK3zY4auRyCNh1w19yBW1vAfNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648142662; a=rsa-sha256; cv=none; b=Vwk3w/KOLLruI8OckiotdMfHyXomAiCW8GDj+W2+c6dcFEBnNFk69u4zpXjVFmqgzU4I55 f46p5a1pqBR3RS9vpGTfP1WhaM+OzPjeGwf4RkTEK5NcolFiwjDQJrEQZfgbvywJxMx7w/ TGGFfZOyC5jJlKPBPXj6bCwuFr4vDj9ri8NlzzKhwhyKsDHWqNRnk4ZuxAr2Rkmi8xERRq IuwSJWrOYN7bQS0xHwkzIDWomCMD4w4BNINCovskXBx5O8+oJYLPWsC9WS2IpHR5/WEVux KRS1nxclSSgTnKcNYFLWeKaKqGW1P+dSMAXScD0UNUJJ0k1S0Mifx9RyoE+T+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=26714a5fa2c650f530b4977f1a005bad5f875567 commit 26714a5fa2c650f530b4977f1a005bad5f875567 Author: Allan Jude AuthorDate: 2021-11-04 12:55:33 +0000 Commit: Mark Johnston CommitDate: 2022-03-24 17:24:07 +0000 Allow kern.ipc.maxsockets to be set to current value without error Normally setting kern.ipc.maxsockets returns EINVAL if the new value is not greater than the previous value. This can cause spurious error messages when sysctl.conf is processed multiple times, or when automation systems try to ensure the sysctl is set to the correct value. If the value is unchanged, then just do nothing. Approved by: re (gjb) PR: 243532 Reviewed by: markj Sponsored by: Modirum MDPay Sponsored by: Klara Inc. (cherry picked from commit c441592a0e1591591665cd037a8a5e9b54675f99) (cherry picked from commit 4f69c575996e069bfee62af9db2faa3ffa65db71) --- sys/kern/uipc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 5a3748eb8cf5..bdd7756916d9 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -363,7 +363,7 @@ sysctl_maxsockets(SYSCTL_HANDLER_ARGS) newmaxsockets = maxsockets; error = sysctl_handle_int(oidp, &newmaxsockets, 0, req); - if (error == 0 && req->newptr) { + if (error == 0 && req->newptr && newmaxsockets != maxsockets) { if (newmaxsockets > maxsockets && newmaxsockets <= maxfiles) { maxsockets = newmaxsockets;