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>] [day] [month] [year] [list]
Message-Id: <20231117080151.1825970-1-chentao@kylinos.cn>
Date:   Fri, 17 Nov 2023 16:01:51 +0800
From:   Kunwu Chan <chentao@...inos.cn>
To:     njavali@...vell.com, mrangankar@...vell.com,
        GR-QLogic-Storage-Upstream@...vell.com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        kunwu.chan@...mail.com, Kunwu Chan <chentao@...inos.cn>,
        stable@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: [PATCH] scsi: qedi: Fix an endian bug in qedi_ring_doorbell

drivers/scsi/qedi/qedi_fw.c:932:40: sparse: sparse: incorrect type in
assignment (different base types) expected restricted __le16
[usertype] sq_prod got unsigned short [usertype] fw_sq_prod_idx

Cc: stable@...r.kernel.org
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/r/202311161351.7sPcpket-lkp@intel.com/
Signed-off-by: Kunwu Chan <chentao@...inos.cn>
---
 drivers/scsi/qedi/qedi_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index 6901738324da..72da9dce4e6f 100644
--- a/drivers/scsi/qedi/qedi_fw.c
+++ b/drivers/scsi/qedi/qedi_fw.c
@@ -922,7 +922,7 @@ void qedi_fp_process_cqes(struct qedi_work *work)
 
 static void qedi_ring_doorbell(struct qedi_conn *qedi_conn)
 {
-	qedi_conn->ep->db_data.sq_prod = qedi_conn->ep->fw_sq_prod_idx;
+	qedi_conn->ep->db_data.sq_prod = cpu_to_le16(qedi_conn->ep->fw_sq_prod_idx);
 
 	/* wmb - Make sure fw idx is coherent */
 	wmb();
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ