Re: [syzbot] [media?] INFO: task hung in cec_claim_log_addrs
From: Hillf Danton
Date: Wed Feb 21 2024 - 23:58:48 EST
On Tue, 20 Feb 2024 22:13:24 -0800
> HEAD commit: 83d49ede4b18 Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11ddc734180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
--- x/drivers/media/cec/core/cec-adap.c
+++ y/drivers/media/cec/core/cec-adap.c
@@ -1592,8 +1592,6 @@ static void cec_claim_log_addrs(struct c
if (WARN_ON(adap->is_configuring || adap->is_configured))
return;
- init_completion(&adap->config_completion);
-
/* Ready to kick off the thread */
adap->is_configuring = true;
adap->kthread_config = kthread_run(cec_config_thread_func, adap,
--- x/drivers/media/cec/core/cec-core.c
+++ y/drivers/media/cec/core/cec-core.c
@@ -284,6 +284,7 @@ struct cec_adapter *cec_allocate_adapter
mutex_init(&adap->lock);
INIT_LIST_HEAD(&adap->transmit_queue);
INIT_LIST_HEAD(&adap->wait_queue);
+ init_completion(&adap->config_completion);
init_waitqueue_head(&adap->kthread_waitq);
/* adap->devnode initialization */
--