All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] sctp: fix the proc_handler for sysctl encap_port
@ 2021-05-25  2:49 Xin Long
  2021-05-25 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Long @ 2021-05-25  2:49 UTC (permalink / raw)
  To: network dev, davem, kuba, linux-sctp; +Cc: Marcelo Ricardo Leitner

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 <lucien.xin@gmail.com>
---
 net/sctp/sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index e92df779af73..55871b277f47 100644
--- 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,
 	},
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] sctp: fix the proc_handler for sysctl encap_port
  2021-05-25  2:49 [PATCH net] sctp: fix the proc_handler for sysctl encap_port Xin Long
@ 2021-05-25 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-25 22:20 UTC (permalink / raw)
  To: Xin Long; +Cc: netdev, davem, kuba, linux-sctp, marcelo.leitner

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Mon, 24 May 2021 22:49:42 -0400 you wrote:
> 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 <lucien.xin@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net] sctp: fix the proc_handler for sysctl encap_port
    https://git.kernel.org/netdev/net/c/b2540cdce6e2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-25 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25  2:49 [PATCH net] sctp: fix the proc_handler for sysctl encap_port Xin Long
2021-05-25 22:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.