lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220307174916.892433-1-trix@redhat.com>
Date:   Mon,  7 Mar 2022 09:49:16 -0800
From:   trix@...hat.com
To:     mst@...hat.com, jasowang@...hat.com, nathan@...nel.org,
        ndesaulniers@...gle.com
Cc:     virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        Tom Rix <trix@...hat.com>
Subject: [PATCH] virtio_ring: Initialize vring_size_in_bytes

From: Tom Rix <trix@...hat.com>

On the clang build, there is this error
virtio_ring.c:1772:26: error: variable 'ring_size_in_bytes'
  is uninitialized when used here
  vring_free_queue(vdev, ring_size_in_bytes,
                         ^~~~~~~~~~~~~~~~~~

ring_dma_addr was intialized twice, once with the ring_size_in_bytes.
value.  So fix typo.

Signed-off-by: Tom Rix <trix@...hat.com>
---
 drivers/virtio/virtio_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 905c882600618..b2b567ebb9120 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -1756,7 +1756,7 @@ static void vring_free_vring_packed(struct vring_packed *vring,
 	ring                  = vring->ring;
 	driver                = vring->driver;
 	device                = vring->device;
-	ring_dma_addr         = vring->ring_size_in_bytes;
+	ring_size_in_bytes    = vring->ring_size_in_bytes;
 	event_size_in_bytes   = vring->event_size_in_bytes;
 	ring_dma_addr         = vring->ring_dma_addr;
 	driver_event_dma_addr = vring->driver_event_dma_addr;
-- 
2.26.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ