s/mm-commits/lkml/ On 01/28, Matt Helsley wrote:OK, thanks. This leads to another question which I forgot to ask. This patch has a lot of complications because it tries to preserve the current behaviour: we release the bprm->file when all VM_EXECTUABLE vmas are unmapped. Q: is this so important/useful? I don't think this is very common case, and I don't quite understand why it is critical to release the file. To unmount fs after starting the app? One can always copy the file before execing, or do "/lib/ld-linus.so application" and then unmap the vmas. (I am not arguing, just curious). Well, we only need down_read(mmap_sem) for the very short time. /proc/pid/maps is much "worse" in this sense. Sorry, I was wrong. mmput() has to release ->exe_file if it is called when exec fails before the first do_mmmap(MAP_EXECUTABLE). This also means that it is not completely trivial to set ->exe_file before exec_mmap(), it can fail. This is solvable, but I'm not sure we should do this. Still, the accounting looks a little bit fragile to me. flush_old_exec() increments ->f_count but sets ->num_exe_file_vmas = 0 because we know that the next elf_map() will bump ->num_exe_file_vmas and thus "sync" 2 counters. But I don't see how to do better if we really want to release the file when VM_EXECUTABLE disappears. Oleg. --
| Artem Bityutskiy | [PATCH 10/44 take 2] [UBI] debug unit implementation |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Dave Young | Re: Linux v2.6.24-rc1 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
