From: xiaopeitux@foxmail.com
To: syzbot+f238baf6ded841b5a82e@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, Pei Xiao <xiaopei01@kylinos.cn>
Subject: [PATCH] comedi: test memleak
Date: Mon, 15 Dec 2025 15:50:00 +0800 [thread overview]
Message-ID: <tencent_BDAF5235437278899CF4CDF1BAC24718700A@qq.com> (raw)
In-Reply-To: <693f889b.a70a0220.104cf0.0334.GAE@google.com>
From: Pei Xiao <xiaopei01@kylinos.cn>
#syz test
---
drivers/comedi/comedi_fops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/comedi/comedi_fops.c b/drivers/comedi/comedi_fops.c
index 657c98cd723e..60fb3b0656c1 100644
--- a/drivers/comedi/comedi_fops.c
+++ b/drivers/comedi/comedi_fops.c
@@ -1893,6 +1893,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
ret = s->do_cmdtest(dev, s, &async->cmd);
+ kfree(cmd->chanlist); /* free kernel copy of user chanlist */
+
if (async->cmd.flags & CMDF_BOGUS || ret) {
dev_dbg(dev->class_dev, "test returned %d\n", ret);
*cmd = async->cmd;
--
2.25.1
next prev parent reply other threads:[~2025-12-15 7:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 4:03 [syzbot] [comedi?] memory leak in do_cmd_ioctl syzbot
2025-12-15 7:50 ` xiaopeitux [this message]
2025-12-15 8:05 ` syzbot
2025-12-15 8:50 ` [PATCH] comedi: test kmemleak xiaopeitux
2025-12-15 9:48 ` [syzbot] [comedi?] memory leak in do_cmd_ioctl syzbot
2025-12-15 11:11 ` [PATCH] comedi: runflags cannot determine whether to reclaim chanlist Edward Adam Davis
2025-12-15 12:25 ` Ian Abbott
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_BDAF5235437278899CF4CDF1BAC24718700A@qq.com \
--to=xiaopeitux@foxmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+f238baf6ded841b5a82e@syzkaller.appspotmail.com \
--cc=xiaopei01@kylinos.cn \
/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®