Re: [PATCH 5.15 00/91] 5.15.108-rc1 review

From: Harshit Mogalapalli
Date: Tue Apr 18 2023 - 12:19:20 EST


Hi Greg,

On 18/04/23 8:17 pm, Naresh Kamboju wrote:
On Tue, 18 Apr 2023 at 18:07, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

This is the start of the stable review cycle for the 5.15.108 release.
There are 91 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.

Responses should be made by Thu, 20 Apr 2023 12:02:44 +0000.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.108-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

thanks,

greg k-h


Following patch causing build break on stable-rc 5.15


Waiman Long <longman@xxxxxxxxxx>
cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods

cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods
commit eee87853794187f6adbe19533ed79c8b44b36a91 upstream.

Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>

Build error:
kernel/cgroup/cpuset.c: In function 'cpuset_can_fork':
kernel/cgroup/cpuset.c:2979:30: error: 'cgroup_mutex' undeclared
(first use in this function); did you mean 'cgroup_put'?
2979 | lockdep_assert_held(&cgroup_mutex);
| ^~~~~~~~~~~~
include/linux/lockdep.h:415:61: note: in definition of macro
'lockdep_assert_held'
415 | #define lockdep_assert_held(l) do {
(void)(l); } while (0)
| ^
kernel/cgroup/cpuset.c:2979:30: note: each undeclared identifier is
reported only once for each function it appears in
2979 | lockdep_assert_held(&cgroup_mutex);
| ^~~~~~~~~~~~
include/linux/lockdep.h:415:61: note: in definition of macro
'lockdep_assert_held'
415 | #define lockdep_assert_held(l) do {
(void)(l); } while (0)
| ^
make[3]: *** [scripts/Makefile.build:289: kernel/cgroup/cpuset.o] Error 1



We observed same build error.(5.15.108-rc1), and investigated about this.

Please see the below findings.

With defconfig --> build breaks.
With allmodconfig --> build succeeds.

From the above we know that this is something related to CONFIG.

In 5.15.y -->
cgroup_mutex is defined like this in include/linux/cgroup.h

#ifdef CONFIG_PROVE_RCU
extern struct mutex cgroup_mutex;

In 6.2.y --> include/linux/cgroup.h

extern struct mutex cgroup_mutex;

-- We don't have that ifdef in 6.2.y.

Tom Saeger identified that the below commit moves it out of ifdef.

commit 354ed597442952fb680c9cafc7e4eb8a76f9514c
Author: Yu Zhao <yuzhao@xxxxxxxxxx>
Date: Sun Sep 18 02:00:07 2022 -0600

mm: multi-gen LRU: kill switch

Given that we don't have this commit in 5.15.y and 5.10.y we are seeing this build problem.

on allmodconfig:

~/linux$ grep "CONFIG_PROVE_RCU" .config
CONFIG_PROVE_RCU=y
CONFIG_PROVE_RCU_LIST=y

on defconfig:
~/linux$ grep "CONFIG_PROVE_RCU" .config
-- No match

This explains the failure on defconfig and a build success on allmodconfig.

Thanks,
Harshit


build log:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.15.y/build/v5.15.105-280-g0b6a5617247c/testrun/16291026/suite/build/test/gcc-11-lkftconfig-kunit/log

--
Linaro LKFT
https://lkft.linaro.org