]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tile/elf: reorganize notify_exec()
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 25 Feb 2015 21:58:35 +0000 (13:58 -0800)
committerChris Metcalf <cmetcalf@ezchip.com>
Mon, 16 Mar 2015 19:15:44 +0000 (15:15 -0400)
commit016f7e7081e3a480356e3a041e43a73160816428
tree5e780aa278baff377629864ed25c5955bcfd5047
parentf3de87853f519bbc5861cad2df4da73c46241ea3
tile/elf: reorganize notify_exec()

In the future mm->exe_file will be done without mmap_sem
serialization, thus isolate and reorganize the tile elf
code to make the transition easier. Good users will, make
use of the more standard get_mm_exe_file(), requiring only
holding the mmap_sem to read the value, and relying on reference
counting to make sure that the exe file won't dissappear
underneath us.

The visible effects of this patch are:

   o We now take and drop the mmap_sem more often. Instead of
     just in arch_setup_additional_pages(), we also do it in:

     1) get_mm_exe_file()
     2) to get the mm->vm_file and notify the simulator.

    [Note that 1) will disappear once we change the locking
     rules for exe_file.]

   o We avoid getting a free page and doing d_path() while
     holding the mmap_sem. This requires reordering the checks.

Cc: Chris Metcalf <cmetcalf@ezchip.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
arch/tile/mm/elf.c