lkml.org 
[lkml]   [2024]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [gfs2?] KASAN: slab-use-after-free Read in gfs2_invalidate_folio
Date
please test uaf in gfs2_invalidate_folio

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e8c39d0f57f3

diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 192213c7359a..8d169b389dc1 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -202,16 +202,8 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh)
}
gfs2_log_lock(sdp);
bd = bh->b_private;
- if (bd == NULL) {
- gfs2_log_unlock(sdp);
- unlock_buffer(bh);
- if (bh->b_private == NULL)
- bd = gfs2_alloc_bufdata(gl, bh);
- else
- bd = bh->b_private;
- lock_buffer(bh);
- gfs2_log_lock(sdp);
- }
+ if (bd == NULL)
+ bd = gfs2_alloc_bufdata(gl, bh);
gfs2_assert(sdp, bd->bd_gl == gl);
set_bit(TR_TOUCHED, &tr->tr_flags);
if (list_empty(&bd->bd_list)) {

\
 
 \ /
  Last update: 2024-05-27 16:40    [W:0.181 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site