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: <20231020062055.449185-1-ciprian.regus@analog.com>
Date:   Fri, 20 Oct 2023 09:20:53 +0300
From:   Ciprian Regus <ciprian.regus@...log.com>
To:     <linux-kernel@...r.kernel.org>
CC:     Ciprian Regus <ciprian.regus@...log.com>,
        Dell Jin <dell.jin.code@...look.com>,
        "David S. Miller" <davem@...emloft.net>,
        "Eric Dumazet" <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Alexandru Tachici <alexandru.tachici@...log.com>,
        "Andrew Lunn" <andrew@...n.ch>, Simon Horman <horms@...nel.org>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Amit Kumar Mahapatra <amit.kumar-mahapatra@....com>,
        <netdev@...r.kernel.org>
Subject: [net] net: ethernet: adi: adin1110: Fix uninitialized variable

From: Dell Jin <dell.jin.code@...look.com>

The spi_transfer struct has to have all it's fields initialized to 0 in
this case, since not all of them are set before starting the transfer.
Otherwise, spi_sync_transfer() will sometimes return an error.

Fixes: a526a3cc9c8d ("net: ethernet: adi: adin1110: Fix SPI transfers")
Signed-off-by: Dell Jin <dell.jin.code@...look.com>
Signed-off-by: Ciprian Regus <ciprian.regus@...log.com>
---
 drivers/net/ethernet/adi/adin1110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/adi/adin1110.c b/drivers/net/ethernet/adi/adin1110.c
index ca66b747b7c5..d7c274af6d4d 100644
--- a/drivers/net/ethernet/adi/adin1110.c
+++ b/drivers/net/ethernet/adi/adin1110.c
@@ -296,3 +296,3 @@ static int adin1110_read_fifo(struct adin1110_port_priv *port_priv)
 	u32 header_len = ADIN1110_RD_HEADER_LEN;
-	struct spi_transfer t;
+	struct spi_transfer t = {0};
 	u32 frame_size_no_fcs;
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ