]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, vmalloc: protect va->vm by vmap_area_lock
authorJoonsoo Kim <js1304@gmail.com>
Tue, 26 Mar 2013 23:24:38 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:29:08 +0000 (18:29 +1100)
commit4558aa9291957217c2a6296c8e8cffcdf6d8d816
tree701ce29548af13cfdaaf3975a4d79ea981b2228d
parentd8fc649bf14c7ace4a724329da4bad810c65fdd0
mm, vmalloc: protect va->vm by vmap_area_lock

Inserting and removing an entry to vmlist is linear time complexity, so it
is inefficient.  Following patches will try to remove vmlist entirely.
This patch is preparing step for it.

For removing vmlist, iterating vmlist codes should be changed to iterating
a vmap_area_list.  Before implementing that, we should make sure that when
we iterate a vmap_area_list, accessing to va->vm doesn't cause a race
condition.  This patch ensure that when iterating a vmap_area_list, there
is no race condition for accessing to vm_struct.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c