An error occurred while fetching folder content.
exec: delay address limit change until point of no return
Mathias Krause authored
Unconditionally changing the address limit to USER_DS and not restoring
it to its old value in the error path is wrong because it prevents us
using kernel memory on repeated calls to this function.  This, in fact,
breaks the fallback of hard coded paths to the init program from being
ever successful if the first candidate fails to load.

With this patch applied switching to USER_DS is delayed until the point
of no return is reached which makes it possible to have a multi-arch
rootfs with one arch specific init binary for each of the (hard coded)
probed paths.

Since the address limit is already set to USER_DS when start_thread()
will be invoked, this redundancy can be safely removed.
Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
dac853ae
Name Last commit Last update
..
9p 9p: remove unnecessary dentry_unhash on rmdir, dir rename
adfs Fix common misspellings
affs affs: remove unnecessary dentry_unhash on rmdir, dir rename
afs afs: remove unnecessary dentry_unhash on rmdir, dir rename
autofs4 autofs4: bogus dentry_unhash() added in ->unlink()
befs Fix common misspellings
bfs bfs: remove unnecessary dentry_unhash on dir rename
btrfs Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
cachefiles Fix common misspellings
ceph ceph: fix cap flush race reentrancy
cifs cifs: trivial: add space in fsc error message
coda coda: remove unnecessary dentry_unhash on rmdir, dir rename
configfs configfs: remove unnecessary dentry_unhash on rmdir, dir rename
cramfs cramfs: generate unique inode number for better inode cache usage
debugfs debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
devpts fs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()
dlm Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
ecryptfs eCryptfs: Remove ecryptfs_header_cache_2
efs block: remove per-queue plugging
exofs Fix common misspellings
exportfs vfs: Add open by file handle support
ext2 ext2: fix error msg when mounting fs with too-large blocksize
ext3 fs: pass exact type of data dirties to ->dirty_inode
ext4 fs: pass exact type of data dirties to ->dirty_inode
fat fat: Fix corrupt inode flags when remove ATTR_SYS flag
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
partitions
proc
pstore
qnx4
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c