]> git.baikalelectronics.ru Git - kernel.git/commit
net/sunrpc: Fix return value for sysctl sunrpc.transports
authorArtur Molchanov <arturmolchanov@gmail.com>
Sun, 11 Oct 2020 22:00:45 +0000 (01:00 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 16 Oct 2020 19:15:04 +0000 (15:15 -0400)
commit1ffe1a65572561feed2497592a013014d894a2e6
treeb05a98a9aa0ce5677adaccaff73eeee9dd7b8960
parent795880db2e8a60c4e5eacab4b44b5541af392b4f
net/sunrpc: Fix return value for sysctl sunrpc.transports

Fix returning value for sysctl sunrpc.transports.
Return error code from sysctl proc_handler function proc_do_xprt instead of number of the written bytes.
Otherwise sysctl returns random garbage for this key.

Since v1:
- Handle negative returned value from memory_read_from_buffer as an error

Signed-off-by: Artur Molchanov <arturmolchanov@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/sysctl.c