mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+c041985778e4069e1ce3@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] WARNING: bad unlock balance in seq_read_iter
Date: Sat,  1 Feb 2025 13:30:01 +0800	[thread overview]
Message-ID: <tencent_C95D9CDDB01966CFA00DC1A5898D84920707@qq.com> (raw)
In-Reply-To: <679d36da.050a0220.163cdc.0010.GAE@google.com>

#syz test

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 4cb275316e51..dad032912e1e 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1600,11 +1600,12 @@ static void *s_start(struct seq_file *m, loff_t *pos)
 	struct set_event_iter *iter;
 	loff_t l;
 
+	mutex_lock(&event_mutex);
+
 	iter = kzalloc(sizeof(*iter), GFP_KERNEL);
-	if (!iter)
+	if (!iter) {
 		return NULL;
-
-	mutex_lock(&event_mutex);
+	}
 
 	iter->type = SET_EVENT_FILE;
 	iter->file = list_entry(&tr->events, struct trace_event_file, list);


  parent reply	other threads:[~2025-02-01  5:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 20:47 syzbot
2025-02-01  1:04 ` Edward Adam Davis
2025-02-01  1:24   ` syzbot
2025-02-01  2:27 ` Edward Adam Davis
2025-02-01  2:48   ` syzbot
2025-02-01  3:43 ` Edward Adam Davis
2025-02-01  4:04   ` syzbot
2025-02-01  5:30 ` Edward Adam Davis [this message]
2025-02-01  5:50   ` syzbot
2025-02-01  5:50 ` [PATCH] tracing: keep the event lock balanced Edward Adam Davis
     [not found] <tencent_58E8BAED46CE2479A26D8C2E716D5895940A@qq.com>
2025-02-01  2:03 ` [syzbot] [fs?] WARNING: bad unlock balance in seq_read_iter 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_C95D9CDDB01966CFA00DC1A5898D84920707@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+c041985778e4069e1ce3@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®