summaryrefslogtreecommitdiff
path: root/fs/gfs2/log.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2019-11-14 09:49:11 -0500
committerAndreas Gruenbacher <agruenba@redhat.com>2019-11-14 16:51:00 +0100
commitfe5e7ba11fcf1d75af8173836309e8562aefedef (patch)
treec10085dc5073f46c1472d98d12106f7e21dc523d /fs/gfs2/log.h
parentfeed98a8e5f3e54a8c41a3b26aa914db5d7e3c18 (diff)
gfs2: fix glock reference problem in gfs2_trans_remove_revoke
Commit 9287c6452d2b 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: 9287c6452d2b ("gfs2: Fix occasional glock use-after-free") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/log.h')
-rw-r--r--fs/gfs2/log.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index 2421181dbfb9..2ff163a8dce1 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -76,6 +76,7 @@ extern void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
extern int gfs2_logd(void *data);
extern void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd);
+extern void gfs2_glock_remove_revoke(struct gfs2_glock *gl);
extern void gfs2_write_revokes(struct gfs2_sbd *sdp);
#endif /* __LOG_DOT_H__ */