kernel-fxtec-pro1x/net/sunrpc
J. Bruce Fields f9304c6277 sunrpc: safely reallow resvport min/max inversion
[ Upstream commit 826799e66e8683e5698e140bb9ef69afc8c0014e ]

Commits ffb6ca33b0 and e08ea3a96f prevent setting xprt_min_resvport
greater than xprt_max_resvport, but may also break simple code that sets
one parameter then the other, if the new range does not overlap the old.

Also it looks racy to me, unless there's some serialization I'm not
seeing.  Granted it would probably require malicious privileged processes
(unless there's a chance these might eventually be settable in unprivileged
containers), but still it seems better not to let userspace panic the
kernel.

Simpler seems to be to allow setting the parameters to whatever you want
but interpret xprt_min_resvport > xprt_max_resvport as the empty range.

Fixes: ffb6ca33b0 "sunrpc: Prevent resvport min/max inversion..."
Fixes: e08ea3a96f "sunrpc: Prevent rexvport min/max inversion..."
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-01 09:16:41 +01:00
..
auth_gss SUNRPC: Fix a compile warning for cmpxchg64() 2019-12-01 09:16:40 +01:00
xprtrdma sunrpc: Fix connect metrics 2019-11-24 08:19:49 +01:00
addr.c
auth.c
auth_generic.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c sunrpc: don't mark uninitialised items as VALID. 2019-05-02 09:58:55 +02:00
clnt.c net :sunrpc :clnt :Fix xps refcount imbalance on the error path 2019-07-14 08:11:15 +02:00
debugfs.c
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c SUNRPC: Fix priority queue fairness 2019-11-24 08:19:24 +01:00
socklib.c
stats.c
sunrpc.h
sunrpc_syms.c
svc.c
svc_xprt.c
svcauth.c
svcauth_unix.c
svcsock.c svcrpc: fix UDP on servers with lots of threads 2019-03-23 20:10:10 +01:00
sysctl.c
timer.c
xdr.c
xprt.c sunrpc: Fix connect metrics 2019-11-24 08:19:49 +01:00
xprtmultipath.c
xprtsock.c sunrpc: safely reallow resvport min/max inversion 2019-12-01 09:16:41 +01:00