linux/fs
KOSAKI Motohiro 98391cf4dc exec: don't turn PF_KTHREAD off when a target command was not found
Presently do_execve() turns PF_KTHREAD off before search_binary_handler().
 THis has a theorical risk of PF_KTHREAD getting lost.  We don't have to
turn PF_KTHREAD off in the ENOEXEC case.

This patch moves this flag modification to after the finding of the
executable file.

This is only a theorical issue because kthreads do not call do_execve()
directly.  But fixing would be better.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:13 -07:00
..
9p new helper: ihold() 2010-10-25 21:26:11 -04:00
adfs Merge branch 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:01 -07:00
affs new helper: ihold() 2010-10-25 21:26:11 -04:00
afs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
autofs Merge branch 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:01 -07:00
autofs4 fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
befs
bfs new helper: ihold() 2010-10-25 21:26:11 -04:00
btrfs new helper: ihold() 2010-10-25 21:26:11 -04:00
cachefiles llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ceph writeback: remove nonblocking/encountered_congestion references 2010-10-26 16:52:05 -07:00
cifs writeback: remove nonblocking/encountered_congestion references 2010-10-26 16:52:05 -07:00
coda new helper: ihold() 2010-10-25 21:26:11 -04:00
configfs fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
cramfs
debugfs fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
devpts
dlm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm 2010-10-22 17:33:16 -07:00
ecryptfs Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
efs
exofs new helper: ihold() 2010-10-25 21:26:11 -04:00
exportfs exportfs: use dget_parent 2010-10-25 21:26:13 -04:00
ext2 new helper: ihold() 2010-10-25 21:26:11 -04:00
ext3 new helper: ihold() 2010-10-25 21:26:11 -04:00
ext4 fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
fat Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
freevxfs fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
fscache
fuse Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
gfs2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
hfs switch hfs to hlist_add_fake() 2010-10-25 21:24:16 -04:00
hfsplus new helper: ihold() 2010-10-25 21:26:11 -04:00
hostfs hostfs: code cleanups 2010-10-26 16:52:12 -07:00
hpfs Merge branch 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:01 -07:00
hppfs llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
hugetlbfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
isofs isofs: work-around for Rock Ridge+Joliet CDs with empty ISO root directory 2010-10-27 18:03:08 -07:00
jbd Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
jbd2 Merge branch 'for-2.6.37/barrier' of git://git.kernel.dk/linux-2.6-block 2010-10-22 17:07:18 -07:00
jffs2 new helper: ihold() 2010-10-25 21:26:11 -04:00
jfs new helper: ihold() 2010-10-25 21:26:11 -04:00
lockd Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
logfs new helper: ihold() 2010-10-25 21:26:11 -04:00
minix new helper: ihold() 2010-10-25 21:26:11 -04:00
ncpfs
nfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
nfs_common
nfsd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
nilfs2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
nls
notify split invalidate_inodes() 2010-10-25 21:27:18 -04:00
ntfs new helper: ihold() 2010-10-25 21:26:11 -04:00
ocfs2 fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
omfs
openpromfs
partitions Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-10-25 07:45:10 -07:00
proc /proc/stat: fix scalability of irq sum of all cpu 2010-10-27 18:03:13 -07:00
qnx4 BKL: remove BKL from qnx4 2010-10-21 18:48:04 +02:00
quota
ramfs fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
reiserfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
romfs llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
smbfs smbfs: use dget_parent 2010-10-25 21:26:14 -04:00
squashfs Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
sysfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2010-10-22 19:36:42 -07:00
sysv new helper: ihold() 2010-10-25 21:26:11 -04:00
ubifs new helper: ihold() 2010-10-25 21:26:11 -04:00
udf new helper: ihold() 2010-10-25 21:26:11 -04:00
ufs new helper: ihold() 2010-10-25 21:26:11 -04:00
xfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
aio.c new helper: ihold() 2010-10-25 21:26:11 -04:00
anon_inodes.c fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
attr.c check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
bad_inode.c
binfmt_aout.c Don't dump task struct in a.out core-dumps 2010-10-14 10:57:40 -07:00
binfmt_elf_fdpic.c
binfmt_elf.c ARM: 6342/1: fix ASLR of PIE executables 2010-10-08 10:02:53 +01:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c fs: inode split IO and LRU lists 2010-10-25 21:26:15 -04:00
buffer.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
char_dev.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
compat_binfmt_elf.c
compat_ioctl.c fix rawctl compat ioctls breakage on amd64 and itanic 2010-10-19 11:29:54 +02:00
compat.c Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
dcache.c fs: use RCU read side protection in d_validate 2010-10-25 21:26:13 -04:00
dcookies.c
direct-io.c fs/direct-io.c: fix truncation error in dio_complete() return 2010-10-26 16:52:13 -07:00
drop_caches.c
eventfd.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
eventpoll.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
exec.c exec: don't turn PF_KTHREAD off when a target command was not found 2010-10-27 18:03:13 -07:00
fcntl.c
fifo.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
file_table.c fs: allow for more than 2^31 files 2010-10-26 16:52:15 -07:00
file.c
filesystems.c
fs_struct.c
fs-writeback.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
generic_acl.c
inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-10-26 17:58:44 -07:00
internal.h split invalidate_inodes() 2010-10-25 21:27:18 -04:00
ioctl.c
ioprio.c
Kconfig fs: move exportfs since it is not a networking filesystem 2010-10-26 16:52:13 -07:00
Kconfig.binfmt coredump: default CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y 2010-10-27 18:03:12 -07:00
libfs.c new helper: ihold() 2010-10-25 21:26:11 -04:00
locks.c procfs: fix numbering in /proc/locks 2010-10-26 16:52:13 -07:00
Makefile
mbcache.c
mpage.c
namei.c new helper: ihold() 2010-10-25 21:26:11 -04:00
namespace.c vfs: fix infinite loop caused by clone_mnt race 2010-10-25 21:24:16 -04:00
nfsctl.c
no-block.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
open.c
pipe.c fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
pnode.c
pnode.h
posix_acl.c
read_write.c vfs: introduce FMODE_UNSIGNED_OFFSET for allowing negative f_pos 2010-10-25 21:18:21 -04:00
read_write.h
readdir.c
select.c
seq_file.c fs: take dcache_lock inside __d_path 2010-10-25 21:26:12 -04:00
signalfd.c Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 2010-10-26 10:13:10 -07:00
splice.c
stack.c
stat.c
statfs.c
super.c split invalidate_inodes() 2010-10-25 21:27:18 -04:00
sync.c
timerfd.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
utimes.c
xattr_acl.c
xattr.c