vfs: Fix refcounting of filenames in fs_parser
authorDavid Howells <dhowells@redhat.com>
Mon, 25 Mar 2019 16:38:22 +0000 (16:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:18:51 +0000 (07:18 +0200)
commit12434939ba58717e0259ffe7375f9aa7a5f1c0b8
treeedb43f7251356d938ca6ed6f37fec2521342880c
parentd4911cc1f4b663f5a19707610aa7623d9f94c78a
vfs: Fix refcounting of filenames in fs_parser

commit 7cdfa44227b0d8842d46a775cebe4311150cb8f2 upstream.

Fix an overput in which filename_lookup() unconditionally drops a ref to
the filename it was given, but this isn't taken account of in the caller,
fs_lookup_param().

Addresses-Coverity-ID: 1443811 ("Use after free")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fs_parser.c