summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorj.nixdorf@avm.de <j.nixdorf@avm.de>2021-01-05 17:17:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-19 20:22:38 +0300
commitf6ced16ce529dda32000b154e254f84118ffbd8e (patch)
treee864b0530bb785ec170251066c4da38dc5c49903 /drivers/md
parent21a466aed724f6f2fb10635c982a50c0900ed8f3 (diff)
downloadlinux-f6ced16ce529dda32000b154e254f84118ffbd8e.tar.xz
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>
Diffstat (limited to 'drivers/md')
0 files changed, 0 insertions, 0 deletions