From: Abhishek Kulkarni <adkulkar@umail.iu.edu>
To: linux-kernel@vger.kernel.org
Cc: ericvh@gmail.com, Abhishek Kulkarni <adkulkar@umail.iu.edu>,
v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org
Subject: [PATCH] [net/9p] Possible regression in p9_client_stat
Date: Mon, 13 Jul 2009 07:49:50 -0600 [thread overview]
Message-ID: <1247492991-26009-1-git-send-email-adkulkar@umail.iu.edu> (raw)
Fix a possible regression with p9_client_stat where it can try to kfree an ERR_PTR
after an erroneous p9pdu_readf. Also remove an unnecessary data buffer increment
in p9_client_read.
Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
---
:100644 100644 dd43a82... cc25e63... M net/9p/client.c
net/9p/client.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index dd43a82..cc25e63 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1098,7 +1098,6 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset,
if (data) {
memmove(data, dataptr, count);
- data += count;
}
if (udata) {
@@ -1192,9 +1191,9 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
err = p9pdu_readf(req->rc, clnt->dotu, "wS", &ignored, ret);
if (err) {
- ret = ERR_PTR(err);
p9pdu_dump(1, req->rc);
- goto free_and_error;
+ p9_free_req(clnt, req);
+ goto error;
}
P9_DPRINTK(P9_DEBUG_9P,
@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
p9_free_req(clnt, req);
return ret;
-free_and_error:
- p9_free_req(clnt, req);
error:
kfree(ret);
return ERR_PTR(err);
--
1.6.0.4
next reply other threads:[~2009-07-13 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 13:49 Abhishek Kulkarni [this message]
2009-07-13 13:49 ` [PATCH] [net/9p]: default 9p transport module fix Abhishek Kulkarni
2009-07-14 18:29 ` Eric Van Hensbergen
2009-07-14 18:29 ` [PATCH] [net/9p] Possible regression in p9_client_stat Eric Van Hensbergen
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=1247492991-26009-1-git-send-email-adkulkar@umail.iu.edu \
--to=adkulkar@umail.iu.edu \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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