From: Hang Cheng Date: Mon, 25 Mar 2019 11:05:54 +0000 (+0800) Subject: cec: remove func that may cause deadlock [1/1] X-Git-Tag: hardkernel-4.9.236-104~1472 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=867de9cdfbf62d9ff202884190c8e39c3be29037;p=platform%2Fkernel%2Flinux-amlogic.git cec: remove func that may cause deadlock [1/1] PD#SWPL-5836 Problem: kernel panic when read cec reg Solution: remove func that might cause sleep in spinlock, so as to avoid deadlock Verify: S805X-P241 Change-Id: I8394f69bdbeff6673c795a221c08ef76164c5bdb Signed-off-by: Hang Cheng --- diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 67b3f34..02a543a 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -223,15 +223,10 @@ unsigned int waiting_aocec_free(unsigned int r) { unsigned int cnt = 0; int ret = true; - char *s; while (readl(cec_dev->cec_reg + r) & (1<<23)) { if (cnt++ >= 3500) { pr_info("waiting aocec %x free time out %d\n", r, cnt); - s = kmalloc(2048, GFP_KERNEL); - dump_cecrx_reg(s); - CEC_ERR("%s\n", s); - kfree(s); if (cec_dev->proble_finish) cec_hw_reset(CEC_A); ret = false; diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index a85f09e..7d02287 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -20,7 +20,7 @@ -#define CEC_DRIVER_VERSION "Ver 2019/3/23\n" +#define CEC_DRIVER_VERSION "Ver 2019/3/25\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec"