lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 18 Nov 2021 00:44:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bernard Zhao <bernard@...o.com>, Song Liu <song@...nel.org>,
        linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, Bernard Zhao <bernard@...o.com>
Subject: Re: [PATCH] drivers/md: fix potential memleak

Hi Bernard,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on song-md/md-next]
[also build test ERROR on v5.16-rc1 next-20211117]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bernard-Zhao/drivers-md-fix-potential-memleak/20211115-112133
base:   git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: x86_64-rhel-8.3-func (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/0d67c5d17f8404c6975f34e0c0edccdaa9ab913d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bernard-Zhao/drivers-md-fix-potential-memleak/20211115-112133
        git checkout 0d67c5d17f8404c6975f34e0c0edccdaa9ab913d
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/iommu/ drivers/md/ drivers/misc/sgi-gru/ fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/md/md-bitmap.c: In function 'get_bitmap_from_slot':
>> drivers/md/md-bitmap.c:1964:27: error: expected ';' before 'return'
    1964 |   md_bitmap_destroy(mddev)
         |                           ^
         |                           ;
    1965 |   return ERR_PTR(rv);
         |   ~~~~~~                   


vim +1964 drivers/md/md-bitmap.c

  1954	
  1955	/* caller need to free returned bitmap with md_bitmap_free() */
  1956	struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot)
  1957	{
  1958		int rv = 0;
  1959		struct bitmap *bitmap;
  1960	
  1961		bitmap = md_bitmap_create(mddev, slot);
  1962		if (IS_ERR(bitmap)) {
  1963			rv = PTR_ERR(bitmap);
> 1964			md_bitmap_destroy(mddev)
  1965			return ERR_PTR(rv);
  1966		}
  1967	
  1968		rv = md_bitmap_init_from_disk(bitmap, 0);
  1969		if (rv) {
  1970			md_bitmap_free(bitmap);
  1971			return ERR_PTR(rv);
  1972		}
  1973	
  1974		return bitmap;
  1975	}
  1976	EXPORT_SYMBOL(get_bitmap_from_slot);
  1977	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (41482 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ