]> git.baikalelectronics.ru Git - kernel.git/commit
[IA64] fix file and descriptor handling in perfmon
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 1 May 2008 21:36:36 +0000 (14:36 -0700)
committerTony Luck <tony.luck@intel.com>
Thu, 1 May 2008 21:36:36 +0000 (14:36 -0700)
commit09b26569e27467fcf56954db0f6207d6821e3afb
tree5446de054b7d168c118783df77577f14d4055d81
parent66a794cbe64bae04d80345399e27aea23c06ca27
[IA64] fix file and descriptor handling in perfmon

Races galore...  General rule: as soon as it's in descriptor table,
it's over; another thread might have started IO on it/dup2() it
elsewhere/dup2() something *over* it/etc.  fd_install() is the very
last step one should take - it's a point of no return.

Besides, the damn thing leaked on failure exits...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/perfmon.c