]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tomoyo: reduce mmap_sem hold for mm->exe_file
authorDavidlohr Bueso <dave@stgolabs.net>
Tue, 7 Apr 2015 23:57:05 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 9 Apr 2015 09:07:11 +0000 (19:07 +1000)
commitae96a0c2433cab083410a49f2ba736f026c19cf6
treec720ea92a17ea3e4d5982afcb4f5223609aebe4e
parent01408d789ac5651d2d8785ce3e1e87386c489da7
tomoyo: reduce mmap_sem hold for mm->exe_file

The mm->exe_file is currently serialized with mmap_sem (shared) in order
to both safely (1) read the file and (2) compute the realpath by calling
tomoyo_realpath_from_path, making it an absolute overkill.  Good users
will, on the other hand, make use of the more standard get_mm_exe_file(),
requiring only holding the mmap_sem to read the value, and relying on
reference

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
security/tomoyo/util.c