]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:04:48 +0000 (12:04 +0200)
commit034f569d903d5d44b49aa21b8e642767ab7c537b
tree7cd3e6c6a9a87e205f35ad9f9bdfc3da98760bf7
parent80d42d41c61db83a53898ce08889af0388c3a221
i2c: virtio: Avoid hang by using interruptible completion wait

commit a663b3c47ab10f66130818cf94eb59c971541c3f upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-virtio.c