Re: [PATCH v6 10/12] mmap locking API: rename mmap_sem to mmap_lock

From: Michel Lespinasse
Date: Thu Jun 04 2020 - 01:58:36 EST


On Wed, Jun 3, 2020 at 9:35 PM youling 257 <youling257@xxxxxxxxx> wrote:
> I have build error about kernel/sys.c,
>
> kernel/sys.c: In function âprctl_set_vmaâ:
> kernel/sys.c:2392:18: error:
> âstruct mm_structâ has no member named âmmap_semâ; did you mean
> âmmap_baseâ?
> 2392 | down_write(&mm->mmap_sem);
> | ^~~~~~~~
> | mmap_base
> kernel/sys.c:2402:16: error:
> âstruct mm_structâ has no member named âmmap_semâ; did you mean
> âmmap_baseâ?
> 2402 | up_write(&mm->mmap_sem);
> | ^~~~~~~~
> | mmap_base
>
> why not rename kernel/sys.c mmap_sem to mmap_lock?

The proper fix would be to use the mmap locking apis defined in
include/linux/mmap_lock.h instead.

However I would like more information about your report. Did you apply
the series yourself ? If so, what base tree did you apply it onto ? If
not, what tree did you use that already included the series ?

Thanks,

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.