]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: virtio: Avoid hang by using interruptible completion wait
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 3 Jul 2025 11:31:02 +0000 (17:01 +0530)
committerAndi Shyti <andi.shyti@kernel.org>
Wed, 23 Jul 2025 22:38:01 +0000 (00:38 +0200)
commita663b3c47ab10f66130818cf94eb59c971541c3f
treecde2e8c0dd8d8096bbd3fd2aab8ee45b1d3526c5
parent56344e241c543f17e8102fa13466ad5c3e7dc9ff
i2c: virtio: Avoid hang by using interruptible completion wait

The current implementation uses wait_for_completion(), which can cause
the caller to hang indefinitely if the transfer never completes.

Switch to wait_for_completion_interruptible() so that the operation can
be interrupted by signals.

Fixes: 84e1d0bf1d71 ("i2c: virtio: disable timeout handling")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <stable@vger.kernel.org> # v5.16+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/b8944e9cab8eb959d888ae80add6f2a686159ba2.1751541962.git.viresh.kumar@linaro.org
drivers/i2c/busses/i2c-virtio.c