stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.4 01/14] 9p: virtio: make sure 'offs' is initialized in zc_request
@ 2023-08-13 16:11 Sasha Levin
  2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 02/14] ASoC: da7219: Flush pending AAD IRQ when suspending Sasha Levin
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Sasha Levin @ 2023-08-13 16:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dominique Martinet, Simon Horman, Eric Van Hensbergen,
	Sasha Levin, lucho, davem, edumazet, kuba, pabeni, v9fs, netdev

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 f582351d84ecb..36b5f72e2165c 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -394,7 +394,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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-08-13 16:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 16:11 [PATCH AUTOSEL 5.4 01/14] 9p: virtio: make sure 'offs' is initialized in zc_request Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 02/14] ASoC: da7219: Flush pending AAD IRQ when suspending Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 03/14] ASoC: da7219: Check for failure reading AAD IRQ events Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 04/14] ethernet: atheros: fix return value check in atl1c_tso_csum() Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 05/14] vxlan: generalize vxlan_parse_gpe_hdr and remove unused args Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 06/14] m68k: Fix invalid .section syntax Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 07/14] s390/dasd: use correct number of retries for ERP requests Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 08/14] s390/dasd: fix hanging device after request requeue Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 09/14] fs/nls: make load_nls() take a const parameter Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 10/14] ASoc: codecs: ES8316: Fix DMIC config Sasha Levin
2023-08-13 16:11 ` [PATCH AUTOSEL 5.4 11/14] ASoC: atmel: Fix the 8K sample parameter in I2SC master Sasha Levin
2023-08-13 16:12 ` [PATCH AUTOSEL 5.4 12/14] platform/x86: intel: hid: Always call BTNL ACPI method Sasha Levin
2023-08-13 16:12 ` [PATCH AUTOSEL 5.4 13/14] platform/x86: huawei-wmi: Silence ambient light sensor Sasha Levin
2023-08-13 16:12 ` [PATCH AUTOSEL 5.4 14/14] security: keys: perform capable check only on privileged operations Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).