All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+e14b1036481911ae4d77@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: Re: [syzbot] general protection fault in lmLogSync (2)
Date: Fri, 27 Feb 2026 01:14:14 -0800	[thread overview]
Message-ID: <69a16066.050a0220.305b49.00be.GAE@google.com> (raw)
In-Reply-To: <000000000000ee81a205e9d6e3d7@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] general protection fault in lmLogSync (2)
Author: koike@igalia.com

#syz test

diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c                     
                                                                            
                                                                            
                                                       
index 5b1c5da04163..1fa202fc0458 100644                                     
                                                                            
                                                                            
                                                       
--- a/fs/jfs/jfs_logmgr.c                                                   
                                                                            
                                                                            
                                                       
+++ b/fs/jfs/jfs_logmgr.c                                                   
                                                                            
                                                                            
                                                       
@@ -74,12 +74,6 @@ static struct lbuf *log_redrive_list;                   
                                                                            
                                                                            
                                                       
 static DEFINE_SPINLOCK(log_redrive_lock);                                 
                                                                            
                                                                            
                                                       
                                                                            
                                                                            
                                                                            
                                                       
                                                                            
                                                                            
                                                                            
                                                       
-/*                                                                         
                                                                            
                                                                            
                                                       
- *     log read/write serialization (per log)                             
                                                                            
                                                                            
                                                       
- */                                                                       
                                                                            
                                                                            
                                                       
-#define LOG_LOCK_INIT(log)     mutex_init(&(log)->loglock)                 
                                                                            
                                                                            
                                                       
-#define LOG_LOCK(log)          mutex_lock(&((log)->loglock))               
                                                                            
                                                                            
                                                       
-#define LOG_UNLOCK(log)                mutex_unlock(&((log)->loglock))     
                                                                            
                                                                            
                                                       
                                                                            
                                                                            
                                                                            
                                                       
                                                                            
                                                                            
                                                                            
                                                       
 /*                                                                         
                                                                            
                                                                            
                                                       
diff --git a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h                     
                                                                            
                                                                            
                                                       
index 8b8994e48cd0..09e0ef6aecce 100644                                     
                                                                            
                                                                            
                                                       
--- a/fs/jfs/jfs_logmgr.h                                                   
                                                                            
                                                                            
                                                       
+++ b/fs/jfs/jfs_logmgr.h
@@ -402,6 +402,13 @@ struct jfs_log {
        int no_integrity;       /* 3: flag to disable journaling to disk */
 };
 
+/*
+ * log read/write serialization (per log)
+ */
+#define LOG_LOCK_INIT(log)     mutex_init(&(log)->loglock)
+#define LOG_LOCK(log)          mutex_lock(&((log)->loglock))
+#define LOG_UNLOCK(log)                mutex_unlock(&((log)->loglock))
+
 /*
  * Log flag
  */
diff --git a/fs/jfs/jfs_umount.c b/fs/jfs/jfs_umount.c
index 8ec43f53f686..8547bb5cd3f4 100644
--- a/fs/jfs/jfs_umount.c
+++ b/fs/jfs/jfs_umount.c
@@ -20,6 +20,7 @@
 #include "jfs_superblock.h"
 #include "jfs_dmap.h"
 #include "jfs_imap.h"
+#include "jfs_logmgr.h"
 #include "jfs_metapage.h"
 #include "jfs_debug.h"
 
@@ -63,6 +64,12 @@ int jfs_umount(struct super_block *sb)
        diUnmount(ipimap, 0);
 
        diFreeSpecial(ipimap);
+       /*
+        * Hold log lock so write_special_inodes (lmLogSync) cannot see
+        * this sbi with a NULL inode pointer while iterating log->sb_list.
+        */
+       if (log)
+               LOG_LOCK(log);
        sbi->ipimap = NULL;
 
        /*
@@ -88,6 +95,8 @@ int jfs_umount(struct super_block *sb)
 
        diFreeSpecial(ipbmap);
        sbi->ipbmap = NULL;
+       if (log)
+               LOG_UNLOCK(log);
         /*
         * Make sure all metadata makes it to disk before we mark

-- 
You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/syzkaller-bugs/079704e1-9af1-42a7-85a3-6b48be909525n%40googlegroups.com.

  parent reply	other threads:[~2026-02-27  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 20:40 [syzbot] general protection fault in lmLogSync (2) syzbot
2026-02-25 19:10 ` Forwarded: " syzbot
2026-02-27  9:14 ` syzbot [this message]
2026-02-27 13:10 ` Forwarded: Re: [syzbot] [jfs?] " 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=69a16066.050a0220.305b49.00be.GAE@google.com \
    --to=syzbot+e14b1036481911ae4d77@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.