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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Oct 2023 08:18:01 -0400
From:   Liming Sun <limings@...dia.com>
To:     Vadim Pasternak <vadimp@...dia.com>,
        David Thompson <davthompson@...dia.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>,
        Dan Carpenter <dan.carpenter@...aro.org>
CC:     Liming Sun <limings@...dia.com>,
        <platform-driver-x86@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH v1 1/1] platform/mellanox: mlxbf-tmfifo: Fix a warning message

This commit fixes the smatch static checker warning in
mlxbf_tmfifo_rxtx_word() which complains data not initialized at
line 634 when IS_VRING_DROP() is TRUE. This is not a real bug since
line 634 is for Tx while IS_VRING_DROP() is only set for Rx. So there
is no case that line 634 is executed when IS_VRING_DROP() is TRUE.

This commit initializes the local data variable to avoid unnecessary
confusion to those static analyzing tools.

Signed-off-by: Liming Sun <limings@...dia.com>
---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index f3696a54a2bd..ccc4b51d3379 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -595,8 +595,8 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring,
 {
 	struct virtio_device *vdev = vring->vq->vdev;
 	struct mlxbf_tmfifo *fifo = vring->fifo;
+	u64 data = 0;
 	void *addr;
-	u64 data;
 
 	/* Get the buffer address of this desc. */
 	addr = phys_to_virt(virtio64_to_cpu(vdev, desc->addr));
-- 
2.30.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ