]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
9p: virtio: make sure 'offs' is initialized in zc_request
authorDominique Martinet <asmadeus@codewreck.org>
Wed, 3 May 2023 07:49:27 +0000 (16:49 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:27 +0000 (12:22 +0200)
commit20d449a08749dba25a63538be5206d3467e4e6e2
tree3a7b22de883cd30f4f4bcaf01258450f0a16ade6
parentc4269c7258d947051e9a607c2662f1f54ed973e7
9p: virtio: make sure 'offs' is initialized in zc_request

[ 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