From: GUO Zihua <guozihua@huawei.com>
To: <ericvh@gmail.com>, <lucho@ionkov.net>, <asmadeus@codewreck.org>,
<linux_oss@crudebyte.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <v9fs-developer@lists.sourceforge.net>,
<netdev@vger.kernel.org>
Subject: [PATCH 2/3 v2] 9p: Remove redundent checks for message size against msize.
Date: Thu, 17 Nov 2022 17:11:58 +0800 [thread overview]
Message-ID: <20221117091159.31533-3-guozihua@huawei.com> (raw)
In-Reply-To: <20221117091159.31533-1-guozihua@huawei.com>
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@huawei.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
next prev parent reply other threads:[~2022-11-17 9:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 9:11 [PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work GUO Zihua
2022-11-17 9:11 ` [PATCH 1/3 " GUO Zihua
2022-11-17 9:11 ` GUO Zihua [this message]
2022-11-17 9:11 ` [PATCH 3/3 v2] 9p: Use P9_HDRSZ for header size GUO Zihua
2022-11-17 10:49 ` [PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work asmadeus
2022-11-17 10:54 ` Guozihua (Scott)
2022-11-17 13:33 ` Christian Schoenebeck
2022-11-18 4:59 ` asmadeus
2022-11-18 10:18 ` Guozihua (Scott)
2022-11-18 13:57 ` asmadeus
2022-11-18 15:34 ` Christian Schoenebeck
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=20221117091159.31533-3-guozihua@huawei.com \
--to=guozihua@huawei.com \
--cc=asmadeus@codewreck.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ericvh@gmail.com \
--cc=kuba@kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.