linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the cgroup tree
@ 2013-04-29  4:04 Stephen Rothwell
  2013-04-29 22:55 ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2013-04-29  4:04 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-next, linux-kernel, Nathan Fontenot,
	Benjamin Herrenschmidt, linuxppc-dev, Li Zefan

[-- Attachment #1: Type: text/plain, Size: 2216 bytes --]

Hi Tejun,

After merging the cgroup tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/mm/numa.c: In function 'arch_update_cpu_topology':
arch/powerpc/mm/numa.c:1465:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
arch/powerpc/mm/numa.c:1465:10: error: assignment makes pointer from integer without a cast [-Werror]
arch/powerpc/mm/numa.c:1497:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Caused by commit 30c05350c39d ("powerpc/pseries: Use stop machine to
update cpu maps") from the powerpc tree interacting with (probably)
commit ff794dea52ea ("cpuset: remove include of cgroup.h from cpuset.h")
from the cgroup tree.  Removing includes from header files is fraught
with danger ...

The former should have added an include of linux/slab.h to
arch/powerpc/mm/numa.c.

I have added the following merge fix patch for today (but it should be
applied to the powerpc tree ASAP).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Apr 2013 14:01:44 +1000
Subject: [PATCH] powerpc: numa.c: using kzalloc/kfree requires including
 slab.h

fixes these build errors:

arch/powerpc/mm/numa.c: In function 'arch_update_cpu_topology':
arch/powerpc/mm/numa.c:1465:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
arch/powerpc/mm/numa.c:1465:10: error: assignment makes pointer from integer without a cast [-Werror]
arch/powerpc/mm/numa.c:1497:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/numa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 2d13f90..490e39c 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -26,6 +26,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
+#include <linux/slab.h>
 #include <asm/sparsemem.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2013-04-29  4:04 linux-next: build failure after merge of the cgroup tree Stephen Rothwell
@ 2013-04-29 22:55 ` Tejun Heo
  2013-04-30  1:51   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 24+ messages in thread
From: Tejun Heo @ 2013-04-29 22:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Nathan Fontenot,
	Benjamin Herrenschmidt, linuxppc-dev, Li Zefan

Hello,

On Mon, Apr 29, 2013 at 02:04:33PM +1000, Stephen Rothwell wrote:
> I have added the following merge fix patch for today (but it should be
> applied to the powerpc tree ASAP).
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 29 Apr 2013 14:01:44 +1000
> Subject: [PATCH] powerpc: numa.c: using kzalloc/kfree requires including
>  slab.h
> 
> fixes these build errors:
> 
> arch/powerpc/mm/numa.c: In function 'arch_update_cpu_topology':
> arch/powerpc/mm/numa.c:1465:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
> arch/powerpc/mm/numa.c:1465:10: error: assignment makes pointer from integer without a cast [-Werror]
> arch/powerpc/mm/numa.c:1497:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: Tejun Heo <tj@kernel.org>

Benjamin, can you please pick this up?

Thanks a lot and sorry about the trouble.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2013-04-29 22:55 ` Tejun Heo
@ 2013-04-30  1:51   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Herrenschmidt @ 2013-04-30  1:51 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephen Rothwell, linux-next, linux-kernel, Nathan Fontenot,
	linuxppc-dev, Li Zefan

On Mon, 2013-04-29 at 15:55 -0700, Tejun Heo wrote:
> Benjamin, can you please pick this up?
> 
> Thanks a lot and sorry about the trouble.

Done.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2022-09-12 22:16     ` Tejun Heo
@ 2022-09-15 10:46       ` Peter Zijlstra
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Zijlstra @ 2022-09-15 10:46 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chengming Zhou, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Sep 12, 2022 at 12:16:32PM -1000, Tejun Heo wrote:

> 1. Leave it as-is. Stephen's patch is correct and we can just let Linus know
>    how to resolve it on the pull requests.

> I'm leaning towards #1 but #2 is fine too. Peter, what do you wanna do?

Works for me; I'll make a note for the pull req.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2022-09-12 18:44   ` Tejun Heo
@ 2022-09-12 22:16     ` Tejun Heo
  2022-09-15 10:46       ` Peter Zijlstra
  0 siblings, 1 reply; 24+ messages in thread
From: Tejun Heo @ 2022-09-12 22:16 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chengming Zhou, Linux Kernel Mailing List,
	Linux Next Mailing List

Hello,

On Mon, Sep 12, 2022 at 08:44:48AM -1000, Tejun Heo wrote:
> On Mon, Sep 12, 2022 at 09:38:58AM +0200, Peter Zijlstra wrote:
> > On Mon, Sep 12, 2022 at 04:18:12PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the cgroup tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > 
> > Hmm,. TJ should I base sched/psi on top of drivers-core-next and your
> > cgroup tree?
> 
> Yeah, this is kinda nasty. Lemme just pull drivers-core-next into
> cgorup/for-6.1 so that folks don't have to worry about this and you can just
> pull that one.

I initially thought that driver-core-next was conflicting with
cgroup/for-6.1 but this is simpler. It's a straight forward conflict between
the PSI patchset in the tip tree and changes in cgroup/for-6.1 which are
cleaning up some cftype handling, and the patch that Stephen applied is
correct. So, we can do one of the following two:

1. Leave it as-is. Stephen's patch is correct and we can just let Linus know
   how to resolve it on the pull requests.

2. Pull cgroup/for-6.1 into the tip tree and preemptively resolve the
   conflict there.

I'm leaning towards #1 but #2 is fine too. Peter, what do you wanna do?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2022-09-12  7:38 ` Peter Zijlstra
@ 2022-09-12 18:44   ` Tejun Heo
  2022-09-12 22:16     ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Tejun Heo @ 2022-09-12 18:44 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chengming Zhou, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Sep 12, 2022 at 09:38:58AM +0200, Peter Zijlstra wrote:
> On Mon, Sep 12, 2022 at 04:18:12PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the cgroup tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> 
> Hmm,. TJ should I base sched/psi on top of drivers-core-next and your
> cgroup tree?

Yeah, this is kinda nasty. Lemme just pull drivers-core-next into
cgorup/for-6.1 so that folks don't have to worry about this and you can just
pull that one.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2022-09-12  6:18 Stephen Rothwell
@ 2022-09-12  7:38 ` Peter Zijlstra
  2022-09-12 18:44   ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Zijlstra @ 2022-09-12  7:38 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Tejun Heo, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Chengming Zhou, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Sep 12, 2022 at 04:18:12PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the cgroup tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

Hmm,. TJ should I base sched/psi on top of drivers-core-next and your
cgroup tree?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2022-09-12  6:18 Stephen Rothwell
  2022-09-12  7:38 ` Peter Zijlstra
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2022-09-12  6:18 UTC (permalink / raw)
  To: Tejun Heo, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: Chengming Zhou, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

Hi all,

After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:

kernel/cgroup/cgroup.c:5275:26: error: 'CFTYPE_PRESSURE' undeclared here (not in a function)
 5275 |                 .flags = CFTYPE_PRESSURE,
      |                          ^~~~~~~~~~~~~~~

Caused by commit

  8a693f7766f9 ("cgroup: Remove CFTYPE_PRESSURE")

inteacting with commits

  52b1364ba0b1 ("sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure")
  34f26a15611a ("sched/psi: Per-cgroup PSI accounting disable/re-enable interface")

from the tip tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 12 Sep 2022 16:15:33 +1000
Subject: [PATCH] sched/psi: fix up for "cgroup: Remove CFTYPE_PRESSURE"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/cgroup/cgroup.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 974ca46c6d7b..829aa42e773e 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5272,7 +5272,6 @@ static struct cftype cgroup_psi_files[] = {
 #ifdef CONFIG_IRQ_TIME_ACCOUNTING
 	{
 		.name = "irq.pressure",
-		.flags = CFTYPE_PRESSURE,
 		.file_offset = offsetof(struct cgroup, psi_files[PSI_IRQ]),
 		.seq_show = cgroup_irq_pressure_show,
 		.write = cgroup_irq_pressure_write,
@@ -5282,7 +5281,6 @@ static struct cftype cgroup_psi_files[] = {
 #endif
 	{
 		.name = "cgroup.pressure",
-		.flags = CFTYPE_PRESSURE,
 		.seq_show = cgroup_pressure_show,
 		.write = cgroup_pressure_write,
 	},
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2022-08-29  3:29 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2022-08-29  3:29 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Michal Koutný, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Hi all,

After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:

mm/memcontrol.c: In function 'mem_cgroup_get_from_ino':
mm/memcontrol.c:5114:24: error: returning 'long int' from a function with return type 'struct mem_cgroup *' makes pointer from integer without a cast [-Werror=int-conversion]
 5114 |                 return PTR_ERR(cgrp);
      |                        ^~~~~~~~~~~~~

Caused by commit

  fa7e439cf90b ("cgroup: Homogenize cgroup_get_from_id() return value")

I have used the cgroup tree from next-20220826 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2021-05-11  1:10 ` Roman Gushchin
@ 2021-05-11  1:31   ` Tejun Heo
  0 siblings, 0 replies; 24+ messages in thread
From: Tejun Heo @ 2021-05-11  1:31 UTC (permalink / raw)
  To: Roman Gushchin
  Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List

On Mon, May 10, 2021 at 06:10:36PM -0700, Roman Gushchin wrote:
> On Tue, May 11, 2021 at 10:51:14AM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the cgroup tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> 
> Hi Stephen!
> 
> I've noticed this error and sent v2 almost immediately after the first version,
> however it looks like the first version got merged by a mistake.
> 
> Tejun, can you, please, drop the first version and replace it with v2?
> There is a trivial s/task/tsk fix.
> 
> Thank you and sorry for the confusion!

Done, thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2021-05-11  0:51 Stephen Rothwell
@ 2021-05-11  1:10 ` Roman Gushchin
  2021-05-11  1:31   ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Roman Gushchin @ 2021-05-11  1:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Tejun Heo, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, May 11, 2021 at 10:51:14AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the cgroup tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:

Hi Stephen!

I've noticed this error and sent v2 almost immediately after the first version,
however it looks like the first version got merged by a mistake.

Tejun, can you, please, drop the first version and replace it with v2?
There is a trivial s/task/tsk fix.

Thank you and sorry for the confusion!

Roman

> 
> In file included from include/linux/string.h:6,
> In file included from include/linux/string.h:6,
>                  from arch/powerpc/include/asm/paca.h:15,
>                  from arch/powerpc/include/asm/current.h:13,
>                  from include/linux/sched.h:12,
>                  from include/linux/cgroup.h:12,
>                  from kernel/cgroup/cgroup-internal.h:5,
>                  from kernel/cgroup/cgroup.c:31:
> kernel/cgroup/cgroup.c: In function 'cgroup_exit':
> kernel/cgroup/cgroup.c:6270:17: error: 'task' undeclared (first use in this function); did you mean 'tsk'?
>  6270 |  if (unlikely(!(task->flags & PF_KTHREAD) &&
>       |                 ^~~~
> include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
>    78 | # define unlikely(x) __builtin_expect(!!(x), 0)
>       |                                          ^
> kernel/cgroup/cgroup.c:6270:17: note: each undeclared identifier is reported only once for each function it appears in
>  6270 |  if (unlikely(!(task->flags & PF_KTHREAD) &&
>       |                 ^~~~
> include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
>    78 | # define unlikely(x) __builtin_expect(!!(x), 0)
>       |                                          ^
> 
> Caused by commit
> 
>   c740aad01e41 ("cgroup: inline cgroup_task_freeze()")
> 
> I have used the cgroup tree from next-20210510 for today.
> 
> -- 
> Cheers,
> Stephen Rothwell



^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2021-05-11  0:51 Stephen Rothwell
  2021-05-11  1:10 ` Roman Gushchin
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2021-05-11  0:51 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Roman Gushchin, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

Hi all,

After merging the cgroup tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/linux/string.h:6,
In file included from include/linux/string.h:6,
                 from arch/powerpc/include/asm/paca.h:15,
                 from arch/powerpc/include/asm/current.h:13,
                 from include/linux/sched.h:12,
                 from include/linux/cgroup.h:12,
                 from kernel/cgroup/cgroup-internal.h:5,
                 from kernel/cgroup/cgroup.c:31:
kernel/cgroup/cgroup.c: In function 'cgroup_exit':
kernel/cgroup/cgroup.c:6270:17: error: 'task' undeclared (first use in this function); did you mean 'tsk'?
 6270 |  if (unlikely(!(task->flags & PF_KTHREAD) &&
      |                 ^~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^
kernel/cgroup/cgroup.c:6270:17: note: each undeclared identifier is reported only once for each function it appears in
 6270 |  if (unlikely(!(task->flags & PF_KTHREAD) &&
      |                 ^~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
   78 | # define unlikely(x) __builtin_expect(!!(x), 0)
      |                                          ^

Caused by commit

  c740aad01e41 ("cgroup: inline cgroup_task_freeze()")

I have used the cgroup tree from next-20210510 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2021-04-22  6:31 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2021-04-22  6:31 UTC (permalink / raw)
  To: Tejun Heo, Paolo Bonzini, KVM
  Cc: Sean Christopherson, Vipin Sharma, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3757 bytes --]

Hi all,

After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:

arch/x86/kvm/svm/sev.c: In function 'sev_asid_new':
arch/x86/kvm/svm/sev.c:118:12: error: invalid type argument of '->' (have 'int')
  118 |  type = sev->es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
      |            ^~
In file included from arch/x86/include/asm/bug.h:93,
                 from include/linux/bug.h:5,
                 from include/linux/mmdebug.h:5,
                 from include/linux/percpu.h:5,
                 from include/linux/context_tracking_state.h:5,
                 from include/linux/hardirq.h:5,
                 from include/linux/kvm_host.h:7,
                 from arch/x86/kvm/svm/sev.c:11:
arch/x86/kvm/svm/sev.c:119:13: error: invalid type argument of '->' (have 'int')
  119 |  WARN_ON(sev->misc_cg);
      |             ^~
arch/x86/kvm/svm/sev.c:119:2: note: in expansion of macro 'WARN_ON'
  119 |  WARN_ON(sev->misc_cg);
      |  ^~~~~~~
arch/x86/kvm/svm/sev.c:120:5: error: invalid type argument of '->' (have 'int')
  120 |  sev->misc_cg = get_current_misc_cg();
      |     ^~
arch/x86/kvm/svm/sev.c:121:36: error: invalid type argument of '->' (have 'int')
  121 |  ret = misc_cg_try_charge(type, sev->misc_cg, 1);
      |                                    ^~
arch/x86/kvm/svm/sev.c:123:18: error: invalid type argument of '->' (have 'int')
  123 |   put_misc_cg(sev->misc_cg);
      |                  ^~
arch/x86/kvm/svm/sev.c:124:6: error: invalid type argument of '->' (have 'int')
  124 |   sev->misc_cg = NULL;
      |      ^~
arch/x86/kvm/svm/sev.c:154:28: error: invalid type argument of '->' (have 'int')
  154 |  misc_cg_uncharge(type, sev->misc_cg, 1);
      |                            ^~
arch/x86/kvm/svm/sev.c:155:17: error: invalid type argument of '->' (have 'int')
  155 |  put_misc_cg(sev->misc_cg);
      |                 ^~
arch/x86/kvm/svm/sev.c:156:5: error: invalid type argument of '->' (have 'int')
  156 |  sev->misc_cg = NULL;
      |     ^~

Caused by commit

  7aef27f0b2a8 ("svm/sev: Register SEV and SEV-ES ASIDs to the misc controller")

interacting with commit

  9fa1521daafb ("KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes")

from the kvm tree.

I have applied the following for today, better suggestions welcome.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 22 Apr 2021 16:13:34 +1000
Subject: [PATCH] fixup for "KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kvm/svm/sev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 5ae091509bb0..3458710a9729 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -109,13 +109,13 @@ static bool __sev_recycle_asids(int min_asid, int max_asid)
 	return true;
 }
 
-static int sev_asid_new(bool es_active)
+static int sev_asid_new(bool es_active, struct kvm_sev_info *sev)
 {
 	int pos, min_asid, max_asid, ret;
 	bool retry = true;
 	enum misc_res_type type;
 
-	type = sev->es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
+	type = es_active ? MISC_CG_RES_SEV_ES : MISC_CG_RES_SEV;
 	WARN_ON(sev->misc_cg);
 	sev->misc_cg = get_current_misc_cg();
 	ret = misc_cg_try_charge(type, sev->misc_cg, 1);
@@ -221,7 +221,7 @@ static int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
 	if (unlikely(sev->active))
 		return ret;
 
-	asid = sev_asid_new(es_active);
+	asid = sev_asid_new(es_active, sev);
 	if (asid < 0)
 		return ret;
 	sev->asid = asid;
-- 
2.30.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2015-09-25  3:26 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2015-09-25  3:26 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-next, linux-kernel, Vladimir Davydov, Andrew Morton, Michal Hocko

Hi Tejun,

After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:

mm/vmscan.c: In function 'sane_reclaim':
mm/vmscan.c:178:2: error: implicit declaration of function 'cgroup_on_dfl' [-Werror=implicit-function-declaration]
  if (cgroup_on_dfl(memcg->css.cgroup))
  ^

Caused by commit

  d5028f9f7d8d ("vmscan: fix sane_reclaim helper for legacy memcg")

from Linus' tree interacting with commit

  9e10a130d9b6 ("cgroup: replace cgroup_on_dfl() tests in controllers with cgroup_subsys_on_dfl()")

from the cgroup tree.

We new this was coming, so I have applied the following merge fix patch from Andrew's tree and can carry it as necessary:

From: Michal Hocko <mhocko@kernel.org>
Subject: vmscan build fix



Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vmscan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/vmscan.c~vmscan-build-fix mm/vmscan.c
--- a/mm/vmscan.c~vmscan-build-fix
+++ a/mm/vmscan.c
@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_con
 	if (!memcg)
 		return true;
 #ifdef CONFIG_CGROUP_WRITEBACK
-	if (cgroup_on_dfl(memcg->css.cgroup))
+	if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
 		return true;
 #endif
 	return false;
_

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2014-02-26  6:46 Stephen Rothwell
@ 2014-02-26 13:44 ` Tejun Heo
  0 siblings, 0 replies; 24+ messages in thread
From: Tejun Heo @ 2014-02-26 13:44 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel, Li Zefan

On Wed, Feb 26, 2014 at 05:46:55PM +1100, Stephen Rothwell wrote:
> Hi Tejun,
> 
> After merging the cgroup tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/cgroup.c: In function 'cgroup_mount':
> kernel/cgroup.c:1572:2: error: too few arguments to function 'kernfs_mount'
>   dentry = kernfs_mount(fs_type, flags, root->kf_root);
>   ^
> 
> Caused by commit 2bd59d48ebfb ("cgroup: convert to kernfs") interacting
> with commit fed95bab8d29 ("sysfs: fix namespace refcnt leak") from the
> driver-core.current tree.
> 
> I added the following merge fix patch, but it may not be completely
> correct, please check.

Yes, that should be fine for now.  I'll soon pull in Greg's tree into
cgroup and apply Li's refcnt fix to cgroup too.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2014-02-26  6:46 Stephen Rothwell
  2014-02-26 13:44 ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2014-02-26  6:46 UTC (permalink / raw)
  To: Tejun Heo, Greg KH; +Cc: linux-next, linux-kernel, Li Zefan

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

Hi Tejun,

After merging the cgroup tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/cgroup.c: In function 'cgroup_mount':
kernel/cgroup.c:1572:2: error: too few arguments to function 'kernfs_mount'
  dentry = kernfs_mount(fs_type, flags, root->kf_root);
  ^

Caused by commit 2bd59d48ebfb ("cgroup: convert to kernfs") interacting
with commit fed95bab8d29 ("sysfs: fix namespace refcnt leak") from the
driver-core.current tree.

I added the following merge fix patch, but it may not be completely
correct, please check.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 26 Feb 2014 17:41:51 +1100
Subject: [PATCH] cgroup: fix up for kernfs_mount API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 306ad0ed19ef..8f4ddbe23d58 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1569,7 +1569,7 @@ out_unlock:
 	if (ret)
 		return ERR_PTR(ret);
 
-	dentry = kernfs_mount(fs_type, flags, root->kf_root);
+	dentry = kernfs_mount(fs_type, flags, root->kf_root, NULL);
 	if (IS_ERR(dentry))
 		cgroup_put(&root->top_cgroup);
 	return dentry;
-- 
1.9.0

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2012-09-14 18:34       ` Tejun Heo
@ 2012-09-15  7:55         ` Sedat Dilek
  0 siblings, 0 replies; 24+ messages in thread
From: Sedat Dilek @ 2012-09-15  7:55 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Daniel Wagner, Stephen Rothwell, linux-next, linux-kernel,
	Li Zefan, Neil Horman

On Fri, Sep 14, 2012 at 8:34 PM, Tejun Heo <tj@kernel.org> wrote:
> On Fri, Sep 14, 2012 at 08:32:28PM +0200, Sedat Dilek wrote:
>> Did you pushed this to [1] already?
>
> Was still building.  Pushed out now.
>

Pulled and works fine here!
Thanks to you.

- Sedat -

P.S.: dmesg checks

$ dmesg | egrep 'cgroup|systemd'
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Command line:
BOOT_IMAGE=/boot/vmlinuz-3.6.0-rc5-next20120914-3-iniza-generic
root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
init=/lib/systemd/systemd
[    0.000000] Kernel command line:
BOOT_IMAGE=/boot/vmlinuz-3.6.0-rc5-next20120914-3-iniza-generic
root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
init=/lib/systemd/systemd
[    0.002082] Initializing cgroup subsys cpuacct
[    0.002087] Initializing cgroup subsys devices
[    0.002089] Initializing cgroup subsys freezer
[    0.002092] Initializing cgroup subsys blkio
[    0.002095] Initializing cgroup subsys perf_event

> Thanks.
>
> --
> tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2012-09-14 18:32     ` Sedat Dilek
@ 2012-09-14 18:34       ` Tejun Heo
  2012-09-15  7:55         ` Sedat Dilek
  0 siblings, 1 reply; 24+ messages in thread
From: Tejun Heo @ 2012-09-14 18:34 UTC (permalink / raw)
  To: Sedat Dilek
  Cc: Daniel Wagner, Stephen Rothwell, linux-next, linux-kernel,
	Li Zefan, Neil Horman

On Fri, Sep 14, 2012 at 08:32:28PM +0200, Sedat Dilek wrote:
> Did you pushed this to [1] already?

Was still building.  Pushed out now.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2012-09-14 17:00   ` Tejun Heo
@ 2012-09-14 18:32     ` Sedat Dilek
  2012-09-14 18:34       ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Sedat Dilek @ 2012-09-14 18:32 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Daniel Wagner, Stephen Rothwell, linux-next, linux-kernel,
	Li Zefan, Neil Horman

On Fri, Sep 14, 2012 at 7:00 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Fri, Sep 14, 2012 at 08:56:29AM +0200, Daniel Wagner wrote:
>> On 14.09.2012 05:17, Stephen Rothwell wrote:
>> >After merging the cgroup tree, today's linux-next build (powerpc
>> >ppc64_defconfig) failed like this:
>> >
>> >drivers/net/tun.c: In function 'tun_alloc_skb':
>> >drivers/net/tun.c:589:2: error: implicit declaration of function 'sock_update_classid' [-Werror=implicit-function-declaration]
>> >
>> >Caused by commit 1f66c0a8833c ("cgroup: net_cls: Move sock_update_classid()
>> >declaration to cls_cgroup.h").  Grep is your friend ...
>
> My apologies.  Forgot allmod build.
>
>> >I have used the cgroup tree from next-20120913 for today.
>>
>> Obviously, it is straight forward to fix this but I do not know what
>> is the preferred solution. Shall I spin an updated version of this
>> patch or add a patch on top of the series?
>
> I fixed the commit in tree.
>
> Thanks.
>

Did you pushed this to [1] already?

- Sedat -

[1] http://git.kernel.org/?p=linux/kernel/git/tj/cgroup.git;a=shortlog;h=refs/heads/for-next

> --
> tejun
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2012-09-14  6:56 ` Daniel Wagner
@ 2012-09-14 17:00   ` Tejun Heo
  2012-09-14 18:32     ` Sedat Dilek
  0 siblings, 1 reply; 24+ messages in thread
From: Tejun Heo @ 2012-09-14 17:00 UTC (permalink / raw)
  To: Daniel Wagner
  Cc: Stephen Rothwell, linux-next, linux-kernel, Li Zefan, Neil Horman

Hello,

On Fri, Sep 14, 2012 at 08:56:29AM +0200, Daniel Wagner wrote:
> On 14.09.2012 05:17, Stephen Rothwell wrote:
> >After merging the cgroup tree, today's linux-next build (powerpc
> >ppc64_defconfig) failed like this:
> >
> >drivers/net/tun.c: In function 'tun_alloc_skb':
> >drivers/net/tun.c:589:2: error: implicit declaration of function 'sock_update_classid' [-Werror=implicit-function-declaration]
> >
> >Caused by commit 1f66c0a8833c ("cgroup: net_cls: Move sock_update_classid()
> >declaration to cls_cgroup.h").  Grep is your friend ...

My apologies.  Forgot allmod build.

> >I have used the cgroup tree from next-20120913 for today.
> 
> Obviously, it is straight forward to fix this but I do not know what
> is the preferred solution. Shall I spin an updated version of this
> patch or add a patch on top of the series?

I fixed the commit in tree.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2012-09-14  3:17 Stephen Rothwell
@ 2012-09-14  6:56 ` Daniel Wagner
  2012-09-14 17:00   ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel Wagner @ 2012-09-14  6:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Tejun Heo, linux-next, linux-kernel, Li Zefan, Neil Horman

Hi Stephen,

On 14.09.2012 05:17, Stephen Rothwell wrote:
> Hi Tejun,
>
> After merging the cgroup tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/net/tun.c: In function 'tun_alloc_skb':
> drivers/net/tun.c:589:2: error: implicit declaration of function 'sock_update_classid' [-Werror=implicit-function-declaration]
>
> Caused by commit 1f66c0a8833c ("cgroup: net_cls: Move sock_update_classid()
> declaration to cls_cgroup.h").  Grep is your friend ...

Sorry about missing to update tun.c. I *swear* I used grep to search
for sock_update_classid() users. It is not the tool's fault when my
brain is not able to decode the things it wants to tell me.

> I have used the cgroup tree from next-20120913 for today.

Obviously, it is straight forward to fix this but I do not know what is 
the preferred solution. Shall I spin an updated version of this patch or 
add a patch on top of the series?

sorry again,
daniel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2012-09-14  3:17 Stephen Rothwell
  2012-09-14  6:56 ` Daniel Wagner
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2012-09-14  3:17 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-next, linux-kernel, Daniel Wagner, Li Zefan, Neil Horman

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

Hi Tejun,

After merging the cgroup tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/net/tun.c: In function 'tun_alloc_skb':
drivers/net/tun.c:589:2: error: implicit declaration of function 'sock_update_classid' [-Werror=implicit-function-declaration]

Caused by commit 1f66c0a8833c ("cgroup: net_cls: Move sock_update_classid()
declaration to cls_cgroup.h").  Grep is your friend ...

I have used the cgroup tree from next-20120913 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: linux-next: build failure after merge of the cgroup tree
  2011-11-25  3:50 Stephen Rothwell
@ 2011-11-27 19:33 ` Tejun Heo
  0 siblings, 0 replies; 24+ messages in thread
From: Tejun Heo @ 2011-11-27 19:33 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Rafael J. Wysocki

Hello,

On Fri, Nov 25, 2011 at 02:50:22PM +1100, Stephen Rothwell wrote:
> I don't know how to fix this up (the obvious fix will cause us to have
> nested rcu_read_lock()s and I have no idea if that is allowed).  Can you
> please provide me with a merge resolution?   I am also wondering why such
> closely related work is happening in 2 different trees.

Sorry about all the conflicts.  There have been major updates to both
freezer and cgroup and cgroup_freezer happens to receive changes from
both subsystem changes.  I dropped cgroup changes for now as Linus
doesn't seem to be too happy with the current approach.  Once an
agreeable approach is found, I'll pull in pm-freezer branch into
cgroup and then put cgroup changes on top of them.  That should remove
most of merging headaches.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 24+ messages in thread

* linux-next: build failure after merge of the cgroup tree
@ 2011-11-25  3:50 Stephen Rothwell
  2011-11-27 19:33 ` Tejun Heo
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2011-11-25  3:50 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-next, linux-kernel, Rafael J. Wysocki

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

Hi Tejun,

After merging the cgroup tree, today's linux-next build (x86_64
allmodconfig) failed like this:

kernel/cgroup_freezer.c: In function 'freezer_can_attach':
kernel/cgroup_freezer.c:179:3: error: implicit declaration of function '__cgroup_freezing_or_frozen' [-Werror=implicit-function-declaration]

Caused by commit cfb5ec210751 ("cgroup: don't use subsys->can_attach_task
() or ->attach_task()") from the cgroup tree interacting with commit
22b4e111fa01 ("cgroup_freezer: prepare for removal of TIF_FREEZE") from
the pm tree.

I don't know how to fix this up (the obvious fix will cause us to have
nested rcu_read_lock()s and I have no idea if that is allowed).  Can you
please provide me with a merge resolution?   I am also wondering why such
closely related work is happening in 2 different trees.

I have used the cgroup tree from next-20111124 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-09-15 10:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29  4:04 linux-next: build failure after merge of the cgroup tree Stephen Rothwell
2013-04-29 22:55 ` Tejun Heo
2013-04-30  1:51   ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2022-09-12  6:18 Stephen Rothwell
2022-09-12  7:38 ` Peter Zijlstra
2022-09-12 18:44   ` Tejun Heo
2022-09-12 22:16     ` Tejun Heo
2022-09-15 10:46       ` Peter Zijlstra
2022-08-29  3:29 Stephen Rothwell
2021-05-11  0:51 Stephen Rothwell
2021-05-11  1:10 ` Roman Gushchin
2021-05-11  1:31   ` Tejun Heo
2021-04-22  6:31 Stephen Rothwell
2015-09-25  3:26 Stephen Rothwell
2014-02-26  6:46 Stephen Rothwell
2014-02-26 13:44 ` Tejun Heo
2012-09-14  3:17 Stephen Rothwell
2012-09-14  6:56 ` Daniel Wagner
2012-09-14 17:00   ` Tejun Heo
2012-09-14 18:32     ` Sedat Dilek
2012-09-14 18:34       ` Tejun Heo
2012-09-15  7:55         ` Sedat Dilek
2011-11-25  3:50 Stephen Rothwell
2011-11-27 19:33 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).