Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2742475pxj; Mon, 31 May 2021 09:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeg2jXKwXXvks/QcLL49hqt+RLSpcEqo3yUUmfDaEdoS5ZPog0QYSBKFWNpKB5JnEmGLL8 X-Received: by 2002:a50:e702:: with SMTP id a2mr26973574edn.3.1622478954777; Mon, 31 May 2021 09:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622478954; cv=none; d=google.com; s=arc-20160816; b=ZK9EtzfZcuhjbcSsvWgX2WXve6P8cQapRWvAwTRSXu9dxu4oar0fYi+c8h/oY3RKVA WItZqh3NhEZDg0iAwLlbrCilRxKu6v4QvxPcPUPQP0yAVMPKRk59ofE24E1jgPJRZlkZ J8w8r5bk5UNFM5RfGdvaCJnaVcLueJvLoxgjxqsAk3+mOFBj18fwN24DoG2p+aUNKHyX Q6/edjZF6iu+HbE/lUU6Kw4o3tWziuHDDFSrKnR+CLE8+xITQzekMpaAiSXXy/tHml0V huCfyySctvufYHP85KYpZ2V/SmXgD2kQ+mSFU37lsx5vrf9ow9CZcADr0ae0fnMfC9rV U/Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+/rmqpCJKOAcJP4PCvBclE0sFhqjsveqTuk1UZLzU9A=; b=YD0iQn7tVySyu4HgrzlgevNEiGqCzEE8HnKr17AOtRGEPDG+yGMc5ilrs1D2LjkAMg /k6DZ1BPfH426NuuQYPe1VgVDhOrcAq4+1j8rI8ssLLFAaW8my4+N4UaDNd2+IWa1xwV S0rffs7AGPcXNdsJdGI+h01zg0N6I3XK0nKQX5pCFuv6qQR0N0VTSlXH9AZOUToDTvo9 Kg0Lq4T7wGWqTMHmGT3RiA9SFXnfjHLDzTuGFe6l4fLC+XZxRLoA31j0uj8hDjG1H4kR w3juSM2wm2NTj73Ftqcd8ux9DcIjYq7nwOGEMKZQs64BmtGXteEvmwObatG5rIzvkhBe k4OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="U/HLAteZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si13299871edj.446.2021.05.31.09.35.31; Mon, 31 May 2021 09:35:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="U/HLAteZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234912AbhEaQgE (ORCPT + 99 others); Mon, 31 May 2021 12:36:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:39874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233607AbhEaOrO (ORCPT ); Mon, 31 May 2021 10:47:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5566861C82; Mon, 31 May 2021 13:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469370; bh=mz+zF9TuSyfs7uhpeWIAMiEjdubkV6lZPEcsY9HO6SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U/HLAteZbv6f7LuZ5tEPx0B0IeeINjccNpPRhgSa9P07yvwHe3n9MryJ3QRMr8Exx ugfq/QgLI4AtmVLWWg2H68blF1SDXgPKGNdbdaNLfJssgawfeGYRHZdVeXZdw57CDI ZwRZZAXfbJGauFn+frmIZlVjJEJckvvlKkyL6Hd8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xin Long , "David S. Miller" Subject: [PATCH 5.12 137/296] sctp: fix the proc_handler for sysctl encap_port Date: Mon, 31 May 2021 15:13:12 +0200 Message-Id: <20210531130708.491160004@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xin Long commit b2540cdce6e22ecf3de54daf5129cc37951348cc upstream. proc_dointvec() cannot do min and max check for setting a value when extra1/extra2 is set, so change it to proc_dointvec_minmax() for sysctl encap_port. Fixes: e8a3001c2120 ("sctp: add encap_port for netns sock asoc and transport") Signed-off-by: Xin Long Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sctp/sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -307,7 +307,7 @@ static struct ctl_table sctp_net_table[] .data = &init_net.sctp.encap_port, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, .extra2 = &udp_port_max, },