summaryrefslogtreecommitdiff
path: root/net/9p
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2021-11-02 13:47:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:17:16 +0300
commit6847c42862972538de4b002de5e82945743d6e35 (patch)
tree3169617496590bd8481f766b156771e26a793b4e /net/9p
parent1f03911876ab9c0bc6f149d4b4d6ea2ac43bc194 (diff)
downloadlinux-6847c42862972538de4b002de5e82945743d6e35.tar.xz
9p/net: fix missing error check in p9_check_errors
commit 27eb4c3144f7a5ebef3c9a261d80cb3e1fa784dc upstream. Link: https://lkml.kernel.org/r/99338965-d36c-886e-cd0e-1d8fff2b4746@gmail.com Reported-by: syzbot+06472778c97ed94af66d@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Dominique Martinet <asmadeus@codewreck.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 213f12ed76cd..7973267ec846 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -541,6 +541,8 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
kfree(ename);
} else {
err = p9pdu_readf(&req->rc, c->proto_version, "d", &ecode);
+ if (err)
+ goto out_err;
err = -ecode;
p9_debug(P9_DEBUG_9P, "<<< RLERROR (%d)\n", -ecode);