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
..
2014-08-02 15:03:58 -07:00
2014-06-12 16:18:45 +02:00
2014-08-08 15:57:17 -07:00
2014-06-10 15:34:46 -07:00
2014-08-05 17:38:45 -07:00
2014-07-17 12:32:47 +02:00
2014-08-06 20:34:19 -07:00
2014-08-06 18:01:24 -07:00
2014-08-04 15:55:08 -07:00
2014-08-06 20:34:19 -07:00
2014-08-05 17:46:42 -07:00
2014-08-05 17:46:42 -07:00
2013-12-10 18:21:34 +00:00
2014-07-23 10:18:05 -07:00
2013-03-12 13:59:14 -07:00
2014-02-18 11:17:17 +01:00
2014-02-18 11:17:17 +01:00
2014-07-24 21:53:47 +10:00
2014-03-20 10:10:53 -04:00
2014-08-06 18:01:12 -07:00
2014-06-10 08:44:40 -07:00
2014-06-04 16:54:14 -07:00
2014-08-08 15:57:18 -07:00
2014-07-24 21:53:47 +10:00
2014-07-15 11:05:09 -04:00
2014-08-04 10:11:28 -07:00
2014-06-04 16:54:19 -07:00
2013-05-01 17:29:18 -04:00
2014-06-14 09:07:44 +02:00
2012-05-31 17:49:27 -07:00
2014-07-05 11:17:45 +02:00
2014-08-04 10:11:28 -07:00
2011-11-06 19:44:47 -08:00
2012-12-18 10:55:28 -08:00
2014-07-23 10:18:06 -07:00
2012-03-28 18:30:03 +01:00
2013-11-09 00:16:23 -05:00
2014-06-04 16:54:15 -07:00
2014-08-08 15:57:22 -07:00
2014-02-13 18:13:22 -08:00
2014-08-08 15:57:23 -07:00
2013-12-19 13:50:32 -05:00
2014-02-02 14:09:12 -08:00
2014-06-21 22:26:24 +02:00
2014-04-03 16:21:05 -07:00
2014-06-04 16:54:15 -07:00
2014-07-05 11:17:26 +02:00
2013-10-19 19:45:35 -04:00
2014-08-08 15:57:18 -07:00
2012-12-20 17:40:19 -08:00
2013-11-15 09:32:22 +09:00
2014-07-16 14:57:13 +02:00
2012-03-23 13:18:57 +01:00
2014-07-30 20:09:37 -07:00
2014-06-06 16:08:12 -07:00
2014-07-18 06:23:40 +02:00
2014-04-25 12:00:49 -07:00
2014-07-28 14:07:52 -04:00
2014-06-04 16:54:15 -07:00
2014-08-06 09:38:14 -07:00
2013-10-25 17:15:18 -04:00
2013-09-25 17:17:01 +01:00
2014-07-03 21:38:32 +08:00
2014-04-24 10:26:39 +02:00
2013-09-07 14:35:32 -07:00
2013-12-05 21:28:42 +08:00
2014-06-06 16:08:12 -07:00
2014-07-17 22:07:37 +02:00
2014-04-02 16:20:21 -07:00
2013-09-30 14:31:03 -07:00
2014-06-06 16:08:13 -07:00
2014-07-16 15:10:39 +02:00
2013-06-18 11:32:10 -05:00
2014-06-04 16:54:15 -07:00
2014-04-12 14:49:50 -07:00
2014-06-04 16:54:15 -07:00
2014-05-23 10:47:21 -06:00
2014-08-06 09:38:14 -07:00
2014-07-09 09:14:33 -07:00
2014-08-06 18:01:22 -07:00
2013-07-14 19:36:59 -04:00
2012-08-13 17:01:07 +02:00
2014-05-22 11:36:10 +02:00
2011-10-31 09:20:12 -04:00
2014-06-04 16:54:15 -07:00
2014-07-18 12:13:37 -07:00
2014-07-18 12:13:38 -07:00
2014-07-01 12:16:24 -07:00
2014-08-06 18:01:19 -07:00
2013-12-10 18:25:28 +00:00
2014-07-17 09:35:17 -04:00
2013-09-11 15:58:27 -07:00
2013-11-19 16:39:05 -05:00
2014-08-08 15:57:18 -07:00
2014-07-07 10:12:56 -07:00
2014-06-21 00:15:26 -04:00
2014-07-23 10:18:05 -07:00
2013-08-30 23:44:11 -07:00
2014-02-24 14:47:15 -08:00
2014-08-08 15:57:22 -07:00
2013-02-27 19:10:24 -08:00
2014-06-04 16:54:16 -07:00
2014-06-06 16:08:16 -07:00
2013-08-30 23:44:11 -07:00
2014-08-06 18:01:13 -07:00
2014-05-20 10:59:32 -04:00
2014-08-04 10:09:27 -07:00