lkml.org 
[lkml]   [2019]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 4.19 209/211] fuse: fix deadlock with aio poll and fuse_iqueue::waitq.lock
On Thu, Oct 03, 2019 at 05:54:35PM +0200, Greg Kroah-Hartman wrote:
>
> static void queue_interrupt(struct fuse_iqueue *fiq, struct fuse_req *req)
> {
> - spin_lock(&fiq->waitq.lock);
> + spin_lock(&fiq->lock);
> if (test_bit(FR_FINISHED, &req->flags)) {
> - spin_unlock(&fiq->waitq.lock);
> + spin_unlock(&fiq->lock);
> return;
> }
> if (list_empty(&req->intr_entry)) {
> list_add_tail(&req->intr_entry, &fiq->interrupts);
> wake_up_locked(&fiq->waitq);
> }
> - spin_unlock(&fiq->waitq.lock);
> + spin_unlock(&fiq->lock);
> kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
> }

This isn't backported correctly. wake_up_locked() needs to be changed to wake_up().

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index c0d59a86ada2e..6d39143cfa094 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -434,7 +434,7 @@ static void queue_interrupt(struct fuse_iqueue *fiq, struct fuse_req *req)
}
if (list_empty(&req->intr_entry)) {
list_add_tail(&req->intr_entry, &fiq->interrupts);
- wake_up_locked(&fiq->waitq);
+ wake_up(&fiq->waitq);
}
spin_unlock(&fiq->lock);
kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
\
 
 \ /
  Last update: 2019-10-03 21:49    [W:0.524 / U:5.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site