]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
fuse: fix blocked_waitq wakeup
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 28 Sep 2018 14:43:22 +0000 (16:43 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Apr 2019 15:51:48 +0000 (17:51 +0200)
commit28ec6315900e886d69edb5d3d6ffb5a6f7c199d0
tree8c5dcb5dfb091d21d03f92df56851de6709218c3
parent43312267c9e040f5bdab38b2f962c9dfdb208399
fuse: fix blocked_waitq wakeup

BugLink: https://bugs.launchpad.net/bugs/1824553
Using waitqueue_active() is racy.  Make sure we issue a wake_up()
unconditionally after storing into fc->blocked.  After that it's okay to
optimize with waitqueue_active() since the first wake up provides the
necessary barrier for all waiters, not the just the woken one.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 3c18ef8117f0 ("fuse: optimize wake_up")
Cc: <stable@vger.kernel.org> # v3.10
(cherry picked from commit 908a572b80f6e9577b45e81b3dfe2e22111286b8)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/fuse/dev.c