Skip to contentSkip to conversation

linux-next: build failure after merge of the akpm tree

PATCH Stephen Rothwell 2 participants 2 messages Apr 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

arch/powerpc/platforms/powernv/vas-fault.c: In function 'update_csb':
arch/powerpc/platforms/powernv/vas-fault.c:130:2: error: implicit declaration of function 'use_mm' [-Werror=implicit-function-declaration]

  130 |  use_mm(window->mm);
      |  ^~~~~~
arch/powerpc/platforms/powernv/vas-fault.c:142:2: error: implicit declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
  142 |  unuse_mm(window->mm);
      |  ^~~~~~~~

Caused by commit

7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract")

interacting with commit

c96c4436aba4 ("powerpc/vas: Update CSB and notify process for fault CRBs")

from the powerpc tree.

I added the following patch for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 22 Apr 2020 16:35:23 +1000
Subject: [PATCH] powerpc/vas: fix up for {un}use_mm() rename

---
 arch/powerpc/platforms/powernv/vas-fault.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/vas-fault.c +2 -2
index 25db70be4c9c..266a6ca5e15e 100644
@@ -127,7 +127,7 @@ static void update_csb(struct vas_window *window,
 		return;
 	}
 
-	use_mm(window->mm);
+	kthread_use_mm(window->mm);
 	rc = copy_to_user(csb_addr, &csb, sizeof(csb));
 	/*
 	 * User space polls on csb.flags (first byte). So add barrier
@@ -139,7 +139,7 @@ static void update_csb(struct vas_window *window,
 		smp_mb();
 		rc = copy_to_user(csb_addr, &csb, sizeof(u8));
 	}
-	unuse_mm(window->mm);
+	kthread_unuse_mm(window->mm);
 	put_task_struct(tsk);
 
 	/* Success */
Signature · 5 lines
2.25.1

-- 
Cheers,
Stephen Rothwell
Acked-by
#1 lore raw

Thanks for fixing. Tested with this patch and 7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract").

Quoted 57 lines · Stephen Rothwell

Hi all,

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

arch/powerpc/platforms/powernv/vas-fault.c: In function 'update_csb':
arch/powerpc/platforms/powernv/vas-fault.c:130:2: error: implicit declaration of function 'use_mm' [-Werror=implicit-function-declaration]

  130 |  use_mm(window->mm);
      |  ^~~~~~
arch/powerpc/platforms/powernv/vas-fault.c:142:2: error: implicit declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
  142 |  unuse_mm(window->mm);
      |  ^~~~~~~~

Caused by commit

7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract")

interacting with commit

c96c4436aba4 ("powerpc/vas: Update CSB and notify process for fault CRBs")

from the powerpc tree.

I added the following patch for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 22 Apr 2020 16:35:23 +1000
Subject: [PATCH] powerpc/vas: fix up for {un}use_mm() rename

---
 arch/powerpc/platforms/powernv/vas-fault.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/vas-fault.c +2 -2
index 25db70be4c9c..266a6ca5e15e 100644
@@ -127,7 +127,7 @@ static void update_csb(struct vas_window *window,
 		return;
 	}
 
-	use_mm(window->mm);
+	kthread_use_mm(window->mm);
 	rc = copy_to_user(csb_addr, &csb, sizeof(csb));
 	/*
 	 * User space polls on csb.flags (first byte). So add barrier
@@ -139,7 +139,7 @@ static void update_csb(struct vas_window *window,
 		smp_mb();
 		rc = copy_to_user(csb_addr, &csb, sizeof(u8));
 	}
-	unuse_mm(window->mm);
+	kthread_unuse_mm(window->mm);
 	put_task_struct(tsk);
 
 	/* Success */