Patch "9p: virtio: make sure 'offs' is initialized in zc_request" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    9p: virtio: make sure 'offs' is initialized in zc_request

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     9p-virtio-make-sure-offs-is-initialized-in-zc_reques.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5fb39cfde6529e07c906fa11d0a7a456ad158782
Author: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
Date:   Wed May 3 16:49:27 2023 +0900

    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@xxxxxxxxxxxx>
    Signed-off-by: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
    Signed-off-by: Eric Van Hensbergen <ericvh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux