author: Miklos Szeredi <mszeredi@redhat.com> 2021-06-22 09:15:35 +0200
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-14 17:06:18 +0200
commit: 2644fd6588e5951012cd4fc7fe016ea8c7157eff
parent: 76d97f2f3b028974f681f32884780f45e09d0d56
Commit Summary:
Diffstat:
1 file changed, 8 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 817a0b1c5c25..6e63bcba2a40 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1272,6 +1272,15 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
goto restart;
}
spin_lock(&fpq->lock);
+ /*
+ * Must not put request on fpq->io queue after having been shut down by
+ * fuse_abort_conn()
+ */
+ if (!fpq->connected) {
+ req->out.h.error = err = -ECONNABORTED;
+ goto out_end;
+
+ }
list_add(&req->list, &fpq->io);
spin_unlock(&fpq->lock);
cs->req = req;