]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/proc/generic.c: fix incorrect pde_is_permanent check
authorColin Ian King <colin.king@canonical.com>
Fri, 7 May 2021 01:02:10 +0000 (18:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:47 +0000 (10:29 +0200)
commitaaf9f00fc11f763bf76f6cd49d98cf1f1e975314
treef9798ae4c23b6f476860ba8226eb46472419d848
parent2897c1d872863db0a7c2e6e93d6742ea4522a2b8
fs/proc/generic.c: fix incorrect pde_is_permanent check

[ Upstream commit f4bf74d82915708208bc9d0c9bd3f769f56bfbec ]

Currently the pde_is_permanent() check is being run on root multiple times
rather than on the next proc directory entry.  This looks like a
copy-paste error.  Fix this by replacing root with next.

Addresses-Coverity: ("Copy-paste error")
Link: https://lkml.kernel.org/r/20210318122633.14222-1-colin.king@canonical.com
Fixes: d919b33dafb3 ("proc: faster open/read/close with "permanent" files")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/proc/generic.c