summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorAl Viro2011-03-04 19:14:21 +0100
committerAl Viro2011-03-04 19:14:21 +0100
commit1858efd471624ecb37e6b5462cab8076f47d1cee (patch)
tree29d1e5d2aad63b798e880011fc527bb4bab63e40 /kernel/sysctl.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmo... (diff)
downloadkernel-qcow2-linux-1858efd471624ecb37e6b5462cab8076f47d1cee.tar.gz
kernel-qcow2-linux-1858efd471624ecb37e6b5462cab8076f47d1cee.tar.xz
kernel-qcow2-linux-1858efd471624ecb37e6b5462cab8076f47d1cee.zip
minimal fix for do_filp_open() race
failure exits on the no-O_CREAT side of do_filp_open() merge with those of O_CREAT one; unfortunately, if do_path_lookup() returns -ESTALE, we'll get out_filp:, notice that we are about to return -ESTALE without having trying to create the sucker with LOOKUP_REVAL and jump right into the O_CREAT side of code. And proceed to try and create a file. Usually that'll fail with -ESTALE again, but we can race and get that attempt of pathname resolution to succeed. open() without O_CREAT really shouldn't end up creating files, races or not. The real fix is to rearchitect the whole do_filp_open(), but for now splitting the failure exits will do. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions