From: syzbot <syzbot+d66de4cbf532749df35f@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod
Date: Sun, 12 Nov 2023 02:16:46 -0800 [thread overview]
Message-ID: <000000000000d3b4b30609f1d94d@google.com> (raw)
In-Reply-To: <000000000000f5ce160602f29dd6@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod
Author: bragathemanick0908@gmail.com
#syz test
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
25aa0bebba72
--- a/fs/btrfs/ref-verify.c
+++ b/fs/btrfs/ref-verify.c
@@ -791,6 +791,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
+ kfree(re);
goto out_unlock;
} else if (be->num_refs == 0) {
btrfs_err(fs_info,
@@ -800,6 +801,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
+ kfree(re);
goto out_unlock;
}
@@ -822,6 +824,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
+ kfree(re);
goto out_unlock;
}
exist->num_refs--;
@@ -838,6 +841,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
+ kfree(re);
goto out_unlock;
}
kfree(ref);
@@ -849,6 +853,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
dump_ref_action(fs_info, ra);
kfree(ref);
kfree(ra);
+ kfree(re);
goto out_unlock;
}
}
@@ -881,6 +886,8 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
}
list_add_tail(&ra->list, &be->actions);
ret = 0;
+ kfree(ra);
+ kfree(re);
out_unlock:
spin_unlock(&fs_info->ref_verify_lock);
out:
next prev parent reply other threads:[~2023-11-12 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 9:15 [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod syzbot
2023-11-12 9:17 ` [syzbot] " syzbot
2023-11-12 9:33 ` syzbot
2023-11-12 10:16 ` syzbot [this message]
2023-11-12 11:04 ` syzbot
2023-11-12 13:08 ` Bragatheswaran Manickavel
2023-11-12 13:45 ` syzbot
2023-11-13 9:44 ` [syzbot] " syzbot
2023-11-16 9:42 ` [syzbot] Re: [syzbot] [btrfs?] " 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=000000000000d3b4b30609f1d94d@google.com \
--to=syzbot+d66de4cbf532749df35f@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.