]> git.baikalelectronics.ru Git - kernel.git/commit
cxl: Fix afu_read() not doing finish_wait() on signal or non-blocking
authorIan Munsie <imunsie@au1.ibm.com>
Thu, 9 Oct 2014 00:17:46 +0000 (11:17 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Oct 2014 00:29:57 +0000 (11:29 +1100)
commit8a0b9df814141947e5649c6f6d15cf1b8df354e0
treea82fe60070c230303bc1daa7ce55384ab46904d0
parent8dedf7e091cbfedc0f1a0655daf8a2ba89911bd0
cxl: Fix afu_read() not doing finish_wait() on signal or non-blocking

If afu_read() returned due to a signal or the AFU file descriptor being
opened non-blocking it would not call finish_wait() before returning,
which could lead to a crash later when something else wakes up the wait
queue.

This patch restructures the wait logic to ensure that the cleanup is
done correctly.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/file.c