All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artur Molchanov <arturmolchanov@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH] net/sunrpc: Fix return value for sysctl sunrpc.transports
Date: Sun, 11 Oct 2020 22:28:57 +0300	[thread overview]
Message-ID: <635CFB46-6C1B-4C7A-9BD6-7B26E6AD022F@gmail.com> (raw)

Fix returning value for sysctl sunrpc.transports.

Without this fix sysctl returns random garbage for this sysctl key.

Signed-off-by: Artur Molchanov <arturmolchanov@gmail.com>
Cc: stable@vger.kernel.org
---
 net/sunrpc/sysctl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 999eee1ed61c..1edcecef23dc 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -70,7 +70,8 @@ static int proc_do_xprt(struct ctl_table *table, int write,
 		return 0;
 	}
 	len = svc_print_xprts(tmpbuf, sizeof(tmpbuf));
-	return memory_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len);
+	*lenp = memory_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len);
+	return 0;
 }
 
 static int
-- 
2.20.1



             reply	other threads:[~2020-10-11 19:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 19:28 Artur Molchanov [this message]
2020-10-11 19:34 ` [PATCH] net/sunrpc: Fix return value for sysctl sunrpc.transports Artur Molchanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=635CFB46-6C1B-4C7A-9BD6-7B26E6AD022F@gmail.com \
    --to=arturmolchanov@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.