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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250708195413.e990d63665144c28b0caa672@linux-foundation.org>
Date: Tue, 8 Jul 2025 19:54:13 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: kernel test robot <lkp@...el.com>
Cc: Colin Ian King <colin.i.king@...il.com>, Phillip Lougher
 <phillip@...ashfs.org.uk>, Chanho Min <chanho.min@....com>,
 <oe-kbuild-all@...ts.linux.dev>, <kernel-janitors@...r.kernel.org>, Linux
 Memory Management List <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] squashfs: Fix incorrect argument to sizeof in
 kmalloc_array call

On Wed, 9 Jul 2025 09:05:25 +0800 kernel test robot <lkp@...el.com> wrote:

> Hi Colin,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on akpm-mm/mm-everything]
> [also build test ERROR on next-20250708]
> [cannot apply to linus/master v6.16-rc5]
> [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#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Colin-Ian-King/squashfs-Fix-incorrect-argument-to-sizeof-in-kmalloc_array-call/20250708-223017
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/20250708142604.1891156-1-colin.i.king%40gmail.com
> patch subject: [PATCH] squashfs: Fix incorrect argument to sizeof in kmalloc_array call
> :::::: branch date: 10 hours ago
> :::::: commit date: 10 hours ago
> config: mips-randconfig-r071-20250709 (attached as .config)
> compiler: mips64-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (attached as reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202507090822.QI1bMiUV-lkp@intel.com/
> 
> All error/warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/percpu.h:5,
>                     from include/linux/percpu_counter.h:14,
>                     from include/linux/mm_types.h:21,
>                     from include/linux/mmzone.h:22,
>                     from include/linux/gfp.h:7,
>                     from include/linux/xarray.h:16,
>                     from include/linux/list_lru.h:14,
>                     from include/linux/fs.h:14,
>                     from include/linux/highmem.h:5,
>                     from include/linux/bvec.h:10,
>                     from include/linux/blk_types.h:10,
>                     from include/linux/blkdev.h:9,
>                     from fs/squashfs/block.c:16:
>    fs/squashfs/block.c: In function 'squashfs_bio_read_cached':
> >> fs/squashfs/block.c:92:12: error: 'folio' undeclared (first use in this function)
>        sizeof(*folio), GFP_KERNEL | __GFP_ZERO);
>                ^~~~~

I made it

	struct folio **cache_folios = kmalloc_array(page_count,
			sizeof(*cache_folios), GFP_KERNEL | __GFP_ZERO);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ