]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
gfs2: Fix glock rhashtable rcu bug
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 7 Jul 2017 18:22:05 +0000 (13:22 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:36:42 +0000 (12:36 +0200)
commit26915474097c2dcf399ee3c7bec41f238f3d9e50
tree190e2c6e174113d8315acd7caa7b8511d4544b5b
parent89fa6cf6a0ec74dc3bc04171b875bd1726e08400
gfs2: Fix glock rhashtable rcu bug

BugLink: http://bugs.launchpad.net/bugs/1705238
commit 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 upstream.

Before commit 88ffbf3e03 "GFS2: Use resizable hash table for glocks",
glocks were freed via call_rcu to allow reading the glock hashtable
locklessly using rcu.  This was then changed to free glocks immediately,
which made reading the glock hashtable unsafe.  Bring back the original
code for freeing glocks via call_rcu.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/gfs2/glock.c
fs/gfs2/incore.h