lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
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 12:48:39PM -0700, Eric Biggers wrote:
> 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);

Thanks for the update and for looking at this. Now added to the
original patch and pushed out as part of a -rc3.

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-10-04 10:00    [W:0.174 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site