public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 01:33:56 -0800	[thread overview]
Message-ID: <000000000000a60a8a0609f14025@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


On 12/11/23 14:53, syzbot wrote:
> Hello,
>
> syzbot tried to test the proposed patch but the build/boot failed:
>
> failed to apply patch:
> checking file fs/btrfs/ref-verify.c
> Hunk #1 FAILED at 791.
> Hunk #2 FAILED at 800.
> 2 out of 2 hunks FAILED
>
>
>
> Tested on:
>
> commit:         1b907d05 Merge tag '6.7-rc-smb3-client-fixes-part2' of..
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=2bf8962e4f7984f4
> dashboard link: https://syzkaller.appspot.com/bug?extid=d66de4cbf532749df35f
> compiler:
> patch:          https://syzkaller.appspot.com/x/patch.diff?x=16845fe0e80000
>
#syz test

--- 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:


  parent reply	other threads:[~2023-11-12  9:40 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 [this message]
2023-11-12 10:16 ` syzbot
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=000000000000a60a8a0609f14025@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox