From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Neil Brown <neilb@suse.de>,
"David S. Miller" <davem@davemloft.net>,
Jeff Layton <jlayton@redhat.com>,
Steve Dickson <steved@redhat.com>,
Suresh Jayaraman <sjayaraman@suse.de>,
Kevin Coffman <kwc@citi.umich.edu>,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 9/9] sunrpc: auth_gss: misused copy_to_user() return value
Date: Fri, 30 Jul 2010 15:10:34 +0400 [thread overview]
Message-ID: <1280488234-21223-1-git-send-email-segooon@gmail.com> (raw)
copy_to_user() returns nonzero value on error, this value may be any
value between 0 and requested count, not only requested count.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
net/sunrpc/auth_gss/auth_gss.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 8da2a0e..232d7dc 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -610,7 +610,7 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
unsigned long left;
left = copy_to_user(dst, data, mlen);
- if (left == mlen) {
+ if (left)
msg->errno = -EFAULT;
return -EFAULT;
}
--
1.7.0.4
next reply other threads:[~2010-07-30 11:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 11:10 Kulikov Vasiliy [this message]
2010-07-30 17:48 ` [PATCH 9/9] sunrpc: auth_gss: misused copy_to_user() return value Trond Myklebust
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=1280488234-21223-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=davem@davemloft.net \
--cc=jlayton@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kwc@citi.umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=sjayaraman@suse.de \
--cc=steved@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).