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>] [day] [month] [year] [list]
Date:   Mon, 28 Nov 2022 17:54:01 +0000
From:   SeongJae Park <sj@...nel.org>
To:     kernel test robot <lkp@...el.com>
Cc:     SeongJae Park <sj@...nel.org>, damon@...ts.linux.dev,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev
Subject: Re: [sj:damon/next 27/34] mm/damon/sysfs-schemes.c:1409:19: error: incomplete definition of type 'struct mem_cgroup'

Hello Robot,

On Mon, 28 Nov 2022 12:00:58 +0800 kernel test robot <lkp@...el.com> wrote:

> [-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
> head:   c68bc40dc2022ce015ee828d0fccb34f864934f8
> commit: 80bd927ee54ff864d9a6ceb1c6ce4803b22e7220 [27/34] mm/damon/sysfs-schemes: implement scheme filters
> config: x86_64-randconfig-r015-20221128
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git/commit/?id=80bd927ee54ff864d9a6ceb1c6ce4803b22e7220
>         git remote add sj https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git
>         git fetch --no-tags sj damon/next
>         git checkout 80bd927ee54ff864d9a6ceb1c6ce4803b22e7220
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@...el.com>
> 
> All errors (new ones prefixed by >>):
> 
> >> mm/damon/sysfs-schemes.c:1409:19: error: incomplete definition of type 'struct mem_cgroup'
>            cgroup_path(memcg->css.cgroup, memcg_path_buf, PATH_MAX);
>                        ~~~~~^
>    include/linux/mm_types.h:33:8: note: forward declaration of 'struct mem_cgroup'
>    struct mem_cgroup;
>           ^
>    1 error generated.
> 
> 
> vim +1409 mm/damon/sysfs-schemes.c
> 
>   1404	
>   1405	static bool damon_sysfs_memcg_path_eq(struct mem_cgroup *memcg,
>   1406			char *memcg_path_buf, char *path)
>   1407	{
>   1408	#ifdef CONFIG_CGROUPS
> > 1409		cgroup_path(memcg->css.cgroup, memcg_path_buf, PATH_MAX);
>   1410		if (sysfs_streq(memcg_path_buf, path))
>   1411			return true;
>   1412	#endif

'struct mem_cgroup' is defined under '#ifdef CONFIG_MEMCG', so this should be
guarded with it.  Fixed it[1].  Thank you again!

[1] https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git/commit/?h=damon/next&id=dc31f4ababd073e1686de0e51f45c5bbd42e66ac


Thanks,
SJ

>   1413		return false;
>   1414	}
>   1415	

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ