Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Nikolay Borisov <nborisov@suse.com>,
	linux-btrfs@vger.kernel.org
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	Nikolay Borisov <nborisov@suse.com>
Subject: [kbuild] Re: [PATCH 2/2] btrfs: Use btrfs_try_lock_balance in btrfs_ioctl_balance
Date: Wed, 4 May 2022 09:46:48 +0300	[thread overview]
Message-ID: <202205041423.NVVJIHSj-lkp@intel.com> (raw)
In-Reply-To: <20220503083637.1051023-3-nborisov@suse.com>

Hi Nikolay,

url:    https://github.com/intel-lab-lkp/linux/commits/Nikolay-Borisov/Refactor-btrfs_ioctl_balance/20220503-163837 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git  for-next
config: i386-randconfig-m021-20220502 (https://download.01.org/0day-ci/archive/20220504/202205041423.NVVJIHSj-lkp@intel.com/config )
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
fs/btrfs/ioctl.c:4493 btrfs_ioctl_balance() error: double free of 'bargs'

vim +/bargs +4493 fs/btrfs/ioctl.c

c9e9f97bdfb64d Ilya Dryomov         2012-01-16  4484  
0f89abf56abbd0 Christian Engelmayer 2015-10-21  4485  	kfree(bctl);
ed0fb78fb6aa29 Ilya Dryomov         2013-01-20  4486  out_unlock:
c9e9f97bdfb64d Ilya Dryomov         2012-01-16  4487  	mutex_unlock(&fs_info->balance_mutex);
ed0fb78fb6aa29 Ilya Dryomov         2013-01-20  4488  	if (need_unlock)
c3e1f96c37d0f8 Goldwyn Rodrigues    2020-08-25  4489  		btrfs_exclop_finish(fs_info);
ed0fb78fb6aa29 Ilya Dryomov         2013-01-20  4490  out:
c696e46e6ec2b3 Nikolay Borisov      2022-05-03  4491  	kfree(bargs);
                                                              ^^^^^

e54bfa31044d60 Liu Bo               2012-06-29  4492  	mnt_drop_write_file(file);
c746db1b6ed99f Nikolay Borisov      2022-03-30 @4493  	kfree(bargs);
                                                              ^^^^^

Freed twice.

c9e9f97bdfb64d Ilya Dryomov         2012-01-16  4494  	return ret;
c9e9f97bdfb64d Ilya Dryomov         2012-01-16  4495  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp 
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org


  reply	other threads:[~2022-05-04  6:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  8:36 [PATCH 0/2] Refactor btrfs_ioctl_balance Nikolay Borisov
2022-05-03  8:36 ` [PATCH 1/2] btrfs: Introduce btrfs_try_lock_balance Nikolay Borisov
2022-05-03 10:20   ` kernel test robot
2022-05-03  8:36 ` [PATCH 2/2] btrfs: Use btrfs_try_lock_balance in btrfs_ioctl_balance Nikolay Borisov
2022-05-04  6:46   ` Dan Carpenter [this message]
2022-05-04  8:44     ` [kbuild] " Nikolay Borisov
2022-05-04 15:25       ` David Sterba
2022-05-05  7:08         ` [PATCH v2] " Nikolay Borisov
2022-05-09 19:51           ` David Sterba
2022-05-10  5:42             ` Nikolay Borisov
2022-05-27 15:58               ` David Sterba
2022-05-06  9:04   ` [btrfs] c696e46e6e: BUG:KASAN:double-free_or_invalid-free_in_btrfs_ioctl_balance kernel test robot

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=202205041423.NVVJIHSj-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nborisov@suse.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