mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+cdee56dbcdf0096ef605@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [xfs?] [ext4?] general protection fault in jbd2__journal_start
Date: Wed, 31 Jan 2024 15:40:41 +0800	[thread overview]
Message-ID: <tencent_7E79026C382CE16C5C96ACE81EEE26CF580A@qq.com> (raw)
In-Reply-To: <000000000000d6e06d06102ae80b@google.com>

please test general protection fault in jbd2__journal_start

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

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index cb0b8d6fc0c6..702312cd5392 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -493,6 +493,9 @@ handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int rsv_blocks,
 		return ERR_PTR(-EROFS);
 
 	if (handle) {
+		if (handle->saved_alloc_context & ~PF_MEMALLOC_NOFS)
+			return ERR_PTR(-EBUSY);
+
 		J_ASSERT(handle->h_transaction->t_journal == journal);
 		handle->h_ref++;
 		return handle;


  parent reply	other threads:[~2024-01-31  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  9:05 [syzbot] " syzbot
2024-01-30 14:52 ` [syzbot] [xfs?] " syzbot
2024-01-30 23:37   ` current->journal_info got nested! (was Re: [syzbot] [xfs?] [ext4?] general protection fault in jbd2__journal_start) Dave Chinner
2024-01-31  3:46     ` Darrick J. Wong
2024-01-31  4:58     ` Theodore Ts'o
2024-01-31  5:20       ` Matthew Wilcox
2024-01-31  5:47         ` Christoph Hellwig
2024-01-31  6:02         ` Dave Chinner
2024-01-31  6:17           ` Christoph Hellwig
2024-01-31 12:02     ` Jan Kara
2024-01-31  7:40   ` Edward Adam Davis [this message]
2024-01-31 11:17     ` [syzbot] [xfs?] [ext4?] general protection fault in jbd2__journal_start syzbot
2024-01-31 12:04   ` [PATCH] jbd2: user-memory-access " Edward Adam Davis
2024-01-31 15:41     ` Jan Kara

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_7E79026C382CE16C5C96ACE81EEE26CF580A@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+cdee56dbcdf0096ef605@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®