1
0
Fork 0
alistair23-linux/include
Vladimir Davydov 41f727fde1 fork/exec: cleanup mm initialization
mm initialization on fork/exec is spread all over the place, which makes
the code look inconsistent.

We have mm_init(), which is supposed to init/nullify mm's internals, but
it doesn't init all the fields it should:

 - on fork ->mmap,mm_rb,vmacache_seqnum,map_count,mm_cpumask,locked_vm
   are zeroed in dup_mmap();

 - on fork ->pmd_huge_pte is zeroed in dup_mm(), immediately before
   calling mm_init();

 - ->cpu_vm_mask_var ptr is initialized by mm_init_cpumask(), which is
   called before mm_init() on both fork and exec;

 - ->context is initialized by init_new_context(), which is called after
   mm_init() on both fork and exec;

Let's consolidate all the initializations in mm_init() to make the code
look cleaner.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:23 -07:00
..
acpi ACPI and power management updates for 3.17-rc1 2014-08-06 20:34:19 -07:00
asm-generic Char / Misc driver patches for 3.17-rc1 2014-08-04 17:32:24 -07:00
clocksource ARM: pxa: Add non device-tree timer link to clocksource 2014-07-23 12:02:39 +02:00
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2014-08-06 08:06:39 -07:00
drm dma-buf: use reservation objects 2014-07-08 13:03:20 -07:00
dt-bindings USB patches for 3.17-rc1 2014-08-04 20:11:28 -07:00
keys Merge remote-tracking branch 'integrity/next-with-keys' into keys-next 2014-07-22 21:54:43 +01:00
kvm
linux fork/exec: cleanup mm initialization 2014-08-08 15:57:23 -07:00
math-emu
media [media] media: atmel-isi: add v4l2 async probe support 2014-07-30 19:35:06 -03:00
memory
misc
net net-timestamp: sock_tx_timestamp() fix 2014-08-06 12:38:07 -07:00
pcmcia
ras trace, RAS: Add eMCA trace event interface 2014-06-25 13:26:47 -07:00
rdma
rxrpc
scsi Merge remote-tracking branch 'scsi-queue/core-for-3.17' into for-next 2014-07-30 00:59:19 -07:00
sound ASoC: Updates for v3.17 2014-08-04 18:28:21 +02:00
target
trace Merge branch 'akpm' (patchbomb from Andrew Morton) 2014-08-06 21:14:42 -07:00
uapi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-08-07 08:50:34 -07:00
video
xen Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-04 17:13:50 -07:00
Kbuild