Re: [PATCH 3/3] tomoyo: robustify handling of mm->exe_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Davidlohr Bueso wrote:
> On Thu, 2015-02-19 at 20:07 +0900, Tetsuo Handa wrote:
> > Why do we need to let the caller call path_put() ?
> > There is no need to do like proc_exe_link() does, for
> > tomoyo_get_exe() returns pathname as "char *".
> 
> Having the pathname doesn't guarantee anything later, and thus doesn't
> seem very robust in the manager call if it can be dropped during the
> call... or can this never occur in this context?
> 
tomoyo_get_exe() returns the pathname of executable of current thread.
The executable of current thread cannot be changed while current thread
is inside the manager call. Although the pathname of executable of
current thread could be changed by other threads via namespace manipulation
like pivot_root(), holding a reference guarantees nothing. Your patch helps
for avoiding memory allocation with mmap_sem held, but does not robustify
handling of mm->exe_file for tomoyo.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]