[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221117091159.31533-3-guozihua@huawei.com>
Date: Thu, 17 Nov 2022 17:11:58 +0800
From: GUO Zihua <guozihua@...wei.com>
To: <ericvh@...il.com>, <lucho@...kov.net>, <asmadeus@...ewreck.org>,
<linux_oss@...debyte.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <v9fs-developer@...ts.sourceforge.net>,
<netdev@...r.kernel.org>
Subject: [PATCH 2/3 v2] 9p: Remove redundent checks for message size against msize.
As the msize is non-consistant with the capacity of the tag and as we
are now checking message size against capacity directly, there is no
point checking message size against msize. So remove it.
Fixes: 3da2e34b64cd ("9p: Fix write overflow in p9_read_work")
Signed-off-by: GUO Zihua <guozihua@...wei.com>
---
net/9p/trans_fd.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 30f37bf7c598..4ba602438550 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -322,14 +322,6 @@ static void p9_read_work(struct work_struct *work)
goto error;
}
- if (m->rc.size >= m->client->msize) {
- p9_debug(P9_DEBUG_ERROR,
- "requested packet size too big: %d\n",
- m->rc.size);
- err = -EIO;
- goto error;
- }
-
p9_debug(P9_DEBUG_TRANS,
"mux %p pkt: size: %d bytes tag: %d\n",
m, m->rc.size, m->rc.tag);
--
2.17.1
Powered by blists - more mailing lists