Re: [PATCH 4.4 00/88] 4.4.168-stable review

Ben Hutchings
2018-12-16T23:58:27Z

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

On Sat, 2018-12-15 at 07:45 -0800, Guenter Roeck wrote:
> On 12/15/18 12:07 AM, Greg Kroah-Hartman wrote:
> > On Fri, Dec 14, 2018 at 06:10:29PM -0800, Guenter Roeck wrote:
> > > On 12/14/18 3:59 AM, Greg Kroah-Hartman wrote:
> > > > This is the start of the stable review cycle for the 4.4.168 release.
> > > > There are 88 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 Sun Dec 16 11:56:41 UTC 2018.
> > > > Anything received after that time might be too late.
> > >
> > > Build results:
> > > total: 170 pass: 145 fail: 25
> > > Failed builds:
> > > arm:allnoconfig
> > > arm:tinyconfig
> > > arm:efm32_defconfig
> > > blackfin:defconfig
> > > blackfin:BF561-EZKIT-SMP_defconfig
> > > c6x:dsk6455_defconfig
> > > c6x:evmc6457_defconfig
> > > c6x:evmc6678_defconfig
> > > h8300:allnoconfig
> > > h8300:tinyconfig
> > > h8300:edosk2674_defconfig
> > > h8300:h8300h-sim_defconfig
> > > h8300:h8s-sim_defconfig
> > > m68k:allnoconfig
> > > m68k:tinyconfig
> > > m68k:m5272c3_defconfig
> > > m68k:m5307c3_defconfig
> > > m68k:m5249evb_defconfig
> > > m68k:m5407c3_defconfig
> > > microblaze:nommu_defconfig
> > > microblaze:allnoconfig
> > > microblaze:tinyconfig
> > > sh:defconfig
> > > sh:allnoconfig
> > > sh:tinyconfig
> > > Qemu test results:
> > > total: 288 pass: 288 fail: 0
> > >
> > > mm/nommu.c: In function '__get_user_pages_unlocked':
> > > mm/nommu.c:211:49: error: 'write' undeclared (first use in this function)
> > > mm/nommu.c:211:56: error: 'force' undeclared (first use in this function)
> > > mm/nommu.c:212:9: warning: passing argument 7 of 'get_user_pages' from incompatible pointer type [enabled by default]
> > > mm/nommu.c:185:6: note: expected 'struct vm_area_struct **' but argument is of type 'struct page **'
> > > mm/nommu.c:212:9: error: too many arguments to function 'get_user_pages'
> > > mm/nommu.c:185:6: note: declared here
> > >
> > > Details are available at https://kerneltests.org/builders/.
> >
> > Ugh, I'll dig through this later on today, we must be missing something
> > with those backports that Ben did...
> >
>
> 69ce144e5c3a ("mm: replace get_user_pages() write/force parameters
> with gup_flags") seems to have missed converting a call of
> get_user_pages().

Right. This was changed earlier upstream in commit cde70140fed8
"mm/gup: Overload get_user_pages() functions", but I don't think it
makes sense to apply all of that. I'm attaching a minimal patch
(tested with an arm allnoconfig build) which should ideally be inserted
before mm-replace-get_user_pages-write-force-parameters-with-
gup_flags.patch.

Ben.

--
Ben Hutchings, Software Developer   Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom

[-- Attachment #2: 0001-mm-nommu.c-Switch-__get_user_pages_unlocked-to-use-_.patch --]
[-- Type: text/x-patch, Size: 1067 bytes --]

From 0d0afe933f60f5736c984e9171214aa34b18764c Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben.hutchings@codethink.co.uk>
Date: Sun, 16 Dec 2018 23:50:08 +0000
Subject: [PATCH] mm/nommu.c: Switch __get_user_pages_unlocked() to use
__get_user_pages()

Extracted from commit cde70140fed8 "mm/gup: Overload get_user_pages()
functions". This is needed before picking commit 768ae309a961
"mm: replace get_user_pages() write/force parameters with gup_flags".

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
---
mm/nommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index fa1560c218d5..2360546db065 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -208,8 +208,8 @@ long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
{
long ret;
down_read(&mm->mmap_sem);
- ret = get_user_pages(tsk, mm, start, nr_pages, write, force,
- pages, NULL);
+ ret = __get_user_pages(tsk, mm, start, nr_pages, gup_flags, pages,
+ NULL, NULL);
up_read(&mm->mmap_sem);
return ret;
}