From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+ecf51a7ccb6b1394e90c@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [jfs?] KASAN: slab-use-after-free Read in lbmIODone
Date: Sat, 18 Apr 2026 14:07:19 +0800 [thread overview]
Message-ID: <tencent_BA765966363CA136EE97CC36F44B0075C709@qq.com> (raw)
In-Reply-To: <69df5517.a00a0220.468cb.0074.GAE@google.com>
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 306165e61438..f795f19d24bb 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1984,7 +1984,7 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
submit_bio(bio);
}
- wait_event(bp->l_ioevent, (bp->l_flag != lbmREAD));
+ wait_event(bp->l_ioevent, (bp->l_flag & lbmDONE));
return 0;
}
@@ -2192,9 +2192,6 @@ static void lbmIODone(struct bio *bio)
if (bp->l_flag & lbmREAD) {
bp->l_flag &= ~lbmREAD;
- /* wakeup I/O initiator */
- LCACHE_WAKEUP(&bp->l_ioevent);
-
goto out;
}
@@ -2217,10 +2214,8 @@ static void lbmIODone(struct bio *bio)
log = bp->l_log;
log->clsn = (bp->l_pn << L2LOGPSIZE) + bp->l_ceor;
- if (bp->l_flag & lbmDIRECT) {
- LCACHE_WAKEUP(&bp->l_ioevent);
+ if (bp->l_flag & lbmDIRECT)
goto out;
- }
tail = log->wqueue;
@@ -2271,8 +2266,7 @@ static void lbmIODone(struct bio *bio)
* leave buffer for i/o initiator to dispose
*/
if (bp->l_flag & lbmSYNC) {
- /* wakeup I/O initiator */
- LCACHE_WAKEUP(&bp->l_ioevent);
+ goto out;
}
/*
@@ -2298,6 +2292,8 @@ static void lbmIODone(struct bio *bio)
out:
bp->l_flag |= lbmDONE;
+ /* wakeup I/O initiator */
+ LCACHE_WAKEUP(&bp->l_ioevent);
LCACHE_UNLOCK(flags);
}
next prev parent reply other threads:[~2026-04-18 6:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 13:20 syzbot
2026-04-15 6:59 ` syzbot
2026-04-15 9:06 ` syzbot
2026-04-17 12:41 ` Edward Adam Davis
2026-04-17 12:59 ` syzbot
2026-04-18 3:56 ` Edward Adam Davis
2026-04-18 5:37 ` syzbot
2026-04-18 4:35 ` Edward Adam Davis
2026-04-18 5:43 ` syzbot
2026-04-18 5:42 ` Edward Adam Davis
2026-04-18 5:50 ` syzbot
2026-04-18 5:49 ` Edward Adam Davis
2026-04-18 5:56 ` syzbot
2026-04-18 5:55 ` Edward Adam Davis
2026-04-18 6:10 ` syzbot
2026-04-18 6:07 ` Edward Adam Davis [this message]
2026-04-18 6:37 ` syzbot
2026-04-18 6:39 ` Edward Adam Davis
2026-04-18 8:53 ` syzbot
2026-04-18 9:05 ` [PATCH] jfs: Read returns only when the bio is done Edward Adam Davis
2026-04-17 14:20 ` Forwarded: [PATCH] jfs: fix use-after-free in lbmIODone by waiting for in-flight I/O syzbot
2026-04-17 16:22 ` Forwarded: Re: [syzbot] KASAN: slab-use-after-free Read in lbmIODone syzbot
2026-04-17 19:26 ` Forwarded: Re: [syzbot] [jfs?] " syzbot
[not found] <20260417142003.3369860-1-tristmd@gmail.com>
2026-04-17 16:37 ` syzbot
[not found] <177644292572.3792638.6921571003846559600@talencesecurity.com>
2026-04-17 18:36 ` syzbot
[not found] <177645401243.291533.1310891472323715606@gmail.com>
2026-04-17 19:58 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_BA765966363CA136EE97CC36F44B0075C709@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+ecf51a7ccb6b1394e90c@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®