]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Fix runaway interruptible timeout
authorAlex Williamson <alex.williamson@redhat.com>
Fri, 1 May 2015 22:31:41 +0000 (16:31 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 1 May 2015 22:31:41 +0000 (16:31 -0600)
commitf913835fcf148f86bcc50e0a183d75095d95de9d
tree838cf9aa408444cbed520ccf294d301019f2b3c1
parent8396b14981ca95e98de9e3a6f6d05de0512c710e
vfio: Fix runaway interruptible timeout

Commit a6fb2660c9ae ("vfio: Add and use device request op for vfio
bus drivers") incorrectly makes use of an interruptible timeout.
When interrupted, the signal remains pending resulting in subsequent
timeouts occurring instantly.  This makes the loop spin at a much
higher rate than intended.

Instead of making this completely non-interruptible, we can change
this into a sort of interruptible-once behavior and use the "once"
to log debug information.  The driver API doesn't allow us to abort
and return an error code.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Fixes: a6fb2660c9ae
Cc: stable@vger.kernel.org # v4.0
drivers/vfio/vfio.c