mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Saeger <tom.saeger@oracle.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Waiman Long" <longman@redhat.com>,
	stable@vger.kernel.org, patches@lists.linux.dev,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	pavel@denx.de, jonathanh@nvidia.com, f.fainelli@gmail.com,
	sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de,
	"Tejun Heo" <tj@kernel.org>, "Michal Koutný" <mkoutny@suse.com>,
	"Daniel Díaz" <daniel.diaz@linaro.org>,
	"Anders Roxell" <anders.roxell@linaro.org>,
	"Darren Kenny" <darren.kenny@oracle.com>,
	"Vegard Nossum" <vegard.nossum@oracle.com>
Subject: Re: [PATCH 5.15 00/91] 5.15.108-rc1 review
Date: Tue, 18 Apr 2023 10:51:05 -0600	[thread overview]
Message-ID: <20230418165105.q5s77yew2imkamsb@oracle.com> (raw)
In-Reply-To: <bd46521c-a167-2872-fecb-2b0f32855a24@oracle.com>

On Tue, Apr 18, 2023 at 09:47:33PM +0530, Harshit Mogalapalli wrote:
> Hi Greg,
> 
> On 18/04/23 8:17 pm, Naresh Kamboju wrote:
> > On Tue, 18 Apr 2023 at 18:07, Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> 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@redhat.com>
> > >      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@linaro.org>
> > 
> > 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@google.com>
> 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
> 

FWIW - partially backporting (location of cgroup_mutex extern) from:
354ed5974429 ("mm: multi-gen LRU: kill switch")

fixes x86_64 build for me.

Regards,

--Tom

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 45cdb12243e3..460ba084888a 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -433,6 +433,8 @@ static inline void cgroup_put(struct cgroup *cgrp)
        css_put(&cgrp->self);
 }

+extern struct mutex cgroup_mutex;
+
 /**
  * task_css_set_check - obtain a task's css_set with extra access conditions
  * @task: the task to obtain css_set for
@@ -447,7 +449,6 @@ static inline void cgroup_put(struct cgroup *cgrp)
  * as locks used during the cgroup_subsys::attach() methods.
  */
 #ifdef CONFIG_PROVE_RCU
-extern struct mutex cgroup_mutex;
 extern spinlock_t css_set_lock;
 #define task_css_set_check(task, __c)                                  \
        rcu_dereference_check((task)->cgroups,                          \
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index d8fcc139ac05..28c32a01da7d 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -165,7 +165,6 @@ struct cgroup_mgctx {
 #define DEFINE_CGROUP_MGCTX(name)                                              \
        struct cgroup_mgctx name = CGROUP_MGCTX_INIT(name)

-extern struct mutex cgroup_mutex;
 extern spinlock_t css_set_lock;
 extern struct cgroup_subsys *cgroup_subsys[];
 extern struct list_head cgroup_roots;

  reply	other threads:[~2023-04-18 16:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 12:21 Greg Kroah-Hartman
2023-04-18 14:47 ` Naresh Kamboju
2023-04-18 16:17   ` Harshit Mogalapalli
2023-04-18 16:51     ` Tom Saeger [this message]
2023-04-19  4:18       ` Bagas Sanjaya
2023-04-19  4:56         ` Yu Zhao
2023-04-19  7:22           ` Greg Kroah-Hartman
2023-04-19  8:44             ` Pavel Machek
2023-04-19 15:09           ` Tom Saeger
2023-04-20  6:47             ` Yu Zhao
2023-04-19  7:24   ` Greg Kroah-Hartman
2023-04-18 20:37 ` Florian Fainelli
2023-04-18 21:26 ` Shuah Khan
2023-04-19  3:54 ` Guenter Roeck
2023-04-19  4:23 ` Bagas Sanjaya

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=20230418165105.q5s77yew2imkamsb@oracle.com \
    --to=tom.saeger@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=daniel.diaz@linaro.org \
    --cc=darren.kenny@oracle.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=patches@kernelci.org \
    --cc=patches@lists.linux.dev \
    --cc=pavel@denx.de \
    --cc=rwarsow@gmx.de \
    --cc=shuah@kernel.org \
    --cc=srw@sladewatkins.net \
    --cc=stable@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vegard.nossum@oracle.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

all inboxes | Powered by JetHome®