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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230817094520.21286-9-Huangzheng.Lai@unisoc.com>
Date:   Thu, 17 Aug 2023 17:45:20 +0800
From:   Huangzheng Lai <Huangzheng.Lai@...soc.com>
To:     Andi Shyti <andi.shyti@...nel.org>
CC:     Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        <linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        huangzheng lai <laihuangzheng@...il.com>,
        Huangzheng Lai <Huangzheng.Lai@...soc.com>,
        Xiongpeng Wu <xiongpeng.wu@...soc.com>
Subject: [PATCH 8/8] i2c: sprd: Increase the waiting time for IIC transmission to avoid system crash issues

Due to the relatively low priority of the isr_thread, when the CPU
load is high, the execution of sprd_i2c_isr_thread will be delayed.
After the waiting time is exceeded, the IIC driver will perform
operations such as disabling the IIC controller. Later, when
sprd_i2c_isr_thread is called by the CPU, there will be kernel panic
caused by illegal access to the IIC register. After pressure testing,
we found that increasing the IIC waiting time to 10 seconds can
avoid this problem.

Signed-off-by: Huangzheng Lai <Huangzheng.Lai@...soc.com>
---
 drivers/i2c/busses/i2c-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c
index 6f65f28ea69d..3c7af04fa177 100644
--- a/drivers/i2c/busses/i2c-sprd.c
+++ b/drivers/i2c/busses/i2c-sprd.c
@@ -76,7 +76,7 @@
 /* timeout (ms) for pm runtime autosuspend */
 #define SPRD_I2C_PM_TIMEOUT	1000
 /* timeout (ms) for transfer message */
-#define I2C_XFER_TIMEOUT	1000
+#define I2C_XFER_TIMEOUT	10000
 /* dynamic modify clk_freq flag  */
 #define	I2C_3M4_FLAG		0x0100
 #define	I2C_1M_FLAG		0x0080
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ