Commit eedfe1c4 authored by Abhishek Kulkarni's avatar Abhishek Kulkarni Committed by Eric Van Hensbergen
Browse files

9p: Possible regression in p9_client_stat

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: default avatarAbhishek Kulkarni <>
Signed-off-by: default avatarEric Van Hensbergen <>
parent a17d1720
......@@ -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;
......@@ -1211,8 +1210,6 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid)
p9_free_req(clnt, req);
return ret;
p9_free_req(clnt, req);
return ERR_PTR(err);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment