Re: [PATCH v2 03/20] x86/mm: temporary mm struct

From: Borislav Petkov
Date: Mon Feb 04 2019 - 09:28:44 EST


On Thu, Jan 31, 2019 at 10:19:54PM +0000, Nadav Amit wrote:
> Having a different struct can prevent the misuse of using mm_structs in
> unuse_temporary_mm() that were not âusedâ using use_temporary_mm. The
> typedef, I presume, can deter users from starting to play with the internal
> âprivateâ fields.

Ok, makes sense.

> > That prev.prev below looks unnecessary, instead of just using prev.
> >
> >> + struct mm_struct *prev;
> >
> > Why "prevâ?
>
> This is obviously the previous active mm. Feel free to suggest an
> alternative name.

Well, when I look at the typedef I'm wondering why is it called "prev"
but I guess this is to mean that it will be saving the previously used
mm, so ack.

Thx.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.