TencentOS-kernel/net/sunrpc
j.nixdorf@avm.de 78c35ad419 net: sunrpc: interpret the return value of kstrtou32 correctly
commit 86b53fbf08f48d353a86a06aef537e78e82ba721 upstream.

A return value of 0 means success. This is documented in lib/kstrtox.c.

This was found by trying to mount an NFS share from a link-local IPv6
address with the interface specified by its index:

  mount("[fe80::1%1]:/srv/nfs", "/mnt", "nfs", 0, "nolock,addr=fe80::1%1")

Before this commit this failed with EINVAL and also caused the following
message in dmesg:

  [...] NFS: bad IP address specified: addr=fe80::1%1

The syscall using the same address based on the interface name instead
of its index succeeds.

Credits for this patch go to my colleague Christian Speich, who traced
the origin of this bug to this line of code.

Signed-off-by: Johannes Nixdorf <j.nixdorf@avm.de>
Fixes: 00cfaa943ec3 ("replace strict_strto calls")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 12:51:28 +08:00
..
auth_gss SUNRPC: fix copying of multiple pages in gss_read_proxy_verf() 2021-03-16 16:39:03 +08:00
xprtrdma xprtrdma: Fix XDRBUF_SPARSE_PAGES support 2021-03-16 16:43:33 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
addr.c net: sunrpc: interpret the return value of kstrtou32 correctly 2021-04-12 12:51:28 +08:00
auth.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
auth_null.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
auth_unix.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backchannel_rqst.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
cache.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
clnt.c SUNRPC: Signalled ASYNC tasks need to exit 2021-03-16 16:27:56 +08:00
debugfs.c net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs' 2021-03-16 16:42:59 +08:00
netns.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rpc_pipe.c sunrpc: fixed rollback in rpc_gssd_dummy_populate() 2021-03-16 16:31:12 +08:00
rpcb_clnt.c SUNRPC: stop printk reading past end of string 2021-03-16 16:36:13 +08:00
sched.c SUNRPC: rpc_wake_up() should wake up tasks in the correct order 2021-03-16 16:42:58 +08:00
socklib.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stats.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
sunrpc.h sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
sunrpc_syms.c sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
svc.c nfsd: Fix NFSv4 READ on RDMA when using readv 2021-03-16 16:33:11 +08:00
svc_xprt.c SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()' 2021-03-16 16:37:08 +08:00
svcauth.c sunrpc: check that domain table is empty at module unload. 2021-03-16 16:32:44 +08:00
svcauth_unix.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
svcsock.c nfsd: Fix NFSv4 READ on RDMA when using readv 2021-03-16 16:33:11 +08:00
sysctl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
timer.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xdr.c SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() 2021-03-16 16:31:12 +08:00
xprt.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2021-03-16 16:42:59 +08:00
xprtmultipath.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xprtsock.c sunrpc: fix xs_read_xdr_buf for partial pages receive 2021-03-16 16:43:14 +08:00