Skip to content
Commit c848ea09 authored by Bob Peterson's avatar Bob Peterson Committed by Paul Gortmaker
Browse files

gfs2: fix glock reference problem in gfs2_trans_remove_revoke

commit fe5e7ba1 upstream.

Commit 9287c645 fixed a situation in which gfs2 could use a glock
after it had been freed. To do that, it temporarily added a new glock
reference by calling gfs2_glock_hold in function gfs2_add_revoke.
However, if the bd element was removed by gfs2_trans_remove_revoke, it
failed to drop the additional reference.

This patch adds logic to gfs2_trans_remove_revoke to properly drop the
additional glock reference.

Fixes: 9287c645

 ("gfs2: Fix occasional glock use-after-free")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent eb30a9e1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment