Re: [PATCH 3/4] prctl: move MMF_EXE_FILE_CHANGED into exe_file struct

2015-03-14 Thread Davidlohr Bueso
On Sat, 2015-03-14 at 15:39 -0700, Davidlohr Bueso wrote: > + if (test_and_set_mm_exe_file(mm, exefd.file)) > + return 0; > + return -EPERM; Bah, this is obviously bogus. We'd need the following folded in: diff --git a/kernel/sys.c b/kernel/sys.c index a82d0c4..41b27bd 100644

[PATCH 3/4] prctl: move MMF_EXE_FILE_CHANGED into exe_file struct

2015-03-14 Thread Davidlohr Bueso
Given the introduction of the exe_file structure, this functionality should be associated with. Because this is a very specific prctl property, it is easily to do so. As of now, when the file has already changed, mmap_sem is not taken at all (however we do need it of course to check the old mapping