mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+63cebbb27f598a7f901b@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [reiserfs?] general protection fault in __fget_files (2)
Date: Fri,  5 Jan 2024 21:14:23 +0800	[thread overview]
Message-ID: <tencent_684C75F177D366163C3136DE97A436404A09@qq.com> (raw)
In-Reply-To: <000000000000caa956060ddf5db1@google.com>

please test general protection fault in __fget_files

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

diff --git a/fs/file.c b/fs/file.c
index 5fb0b146e79e..724f60e6cc4f 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1134,6 +1134,8 @@ static unsigned long __fget_light(unsigned int fd, fmode_t mask)
 			return 0;
 		return (unsigned long)file;
 	} else {
+		if (!atomic_read_acquire(&files->count))
+			return 0;
 		file = __fget(fd, mask);
 		if (!file)
 			return 0;


  reply	other threads:[~2024-01-05 13:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-01  9:54 syzbot
2024-01-05 13:14 ` Edward Adam Davis [this message]
2024-01-05 13:49   ` syzbot
2024-02-15  5:14 ` syzbot
2024-02-15  9:30   ` 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_684C75F177D366163C3136DE97A436404A09@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+63cebbb27f598a7f901b@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®