path_openat(): fix double fput()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 May 2015 02:53:15 +0000 (22:53 -0400)
committerStricted <info@stricted.net>
Tue, 6 Aug 2019 11:33:34 +0000 (11:33 +0000)
commit6723b4ca0e65649557298f5e58644870e41136d6
tree3a634226c4da9f38aa78df0ccd79557fd53f3df5
parenta8931c504ce9456b3bb1194a3f730c05939ff629
path_openat(): fix double fput()

[ Upstream commit f15133df088ecadd141ea1907f2c96df67c729f0 ]

path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().

Change-Id: Ia74c130ae5e379b512532c0feebea871b5f73668
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/namei.c