From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dominique Martinet <asmadeus@codewreck.org>,
Simon Horman <simon.horman@corigine.com>,
Eric Van Hensbergen <ericvh@kernel.org>,
Sasha Levin <sashal@kernel.org>,
lucho@ionkov.net, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, v9fs@lists.linux.dev,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 01/13] 9p: virtio: make sure 'offs' is initialized in zc_request
Date: Sun, 13 Aug 2023 12:13:05 -0400 [thread overview]
Message-ID: <20230813161317.1087606-1-sashal@kernel.org> (raw)
From: Dominique Martinet <asmadeus@codewreck.org>
[ Upstream commit 4a73edab69d3a6623f03817fe950a2d9585f80e4 ]
Similarly to the previous patch: offs can be used in handle_rerrors
without initializing on small payloads; in this case handle_rerrors will
not use it because of the size check, but it doesn't hurt to make sure
it is zero to please scan-build.
This fixes the following warning:
net/9p/trans_virtio.c:539:3: warning: 3rd function call argument is an uninitialized value [core.CallAndMessage]
handle_rerror(req, in_hdr_len, offs, in_pages);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/9p/trans_virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index f7cd8e018bde0..6b3357a77d992 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -409,7 +409,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,
struct page **in_pages = NULL, **out_pages = NULL;
struct virtio_chan *chan = client->trans;
struct scatterlist *sgs[4];
- size_t offs;
+ size_t offs = 0;
int need_drop = 0;
int kicked = 0;
--
2.40.1
next reply other threads:[~2023-08-13 16:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-13 16:13 Sasha Levin [this message]
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 02/13] ASoC: da7219: Flush pending AAD IRQ when suspending Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 03/13] ASoC: da7219: Check for failure reading AAD IRQ events Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 04/13] ethernet: atheros: fix return value check in atl1c_tso_csum() Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 05/13] vxlan: generalize vxlan_parse_gpe_hdr and remove unused args Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 06/13] m68k: Fix invalid .section syntax Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 07/13] s390/dasd: use correct number of retries for ERP requests Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 08/13] s390/dasd: fix hanging device after request requeue Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 09/13] fs/nls: make load_nls() take a const parameter Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 10/13] ASoc: codecs: ES8316: Fix DMIC config Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 11/13] ASoC: atmel: Fix the 8K sample parameter in I2SC master Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 12/13] platform/x86: intel: hid: Always call BTNL ACPI method Sasha Levin
2023-08-13 16:13 ` [PATCH AUTOSEL 4.19 13/13] security: keys: perform capable check only on privileged operations Sasha Levin
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=20230813161317.1087606-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=asmadeus@codewreck.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ericvh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=stable@vger.kernel.org \
--cc=v9fs@lists.linux.dev \
/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
all inboxes | Powered by JetHome®