fix regression in "epoll: Keep a reference on files added to the check list"
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Sep 2020 15:30:48 +0000 (11:30 -0400)
committerPDO SCM Team <hudsoncm@motorola.com>
Mon, 6 Dec 2021 08:55:03 +0000 (03:55 -0500)
commit59f48edc8ae1bb13243b516c0afbe6391dd25ad2
treec34a7046f4cc82afb2d1f4a10f39edf568b755ac
parentbbe661ab6ce7d7f950a51510945b499fbebd49dd
fix regression in "epoll: Keep a reference on files added to the check list"

[ Upstream commit 77f4689de17c0887775bb77896f4cc11a39bf848 ]

epoll_loop_check_proc() can run into a file already committed to destruction;
we can't grab a reference on those and don't need to add them to the set for
reverse path check anyway.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-1048

Change-Id: I8cb3c5c466ef0169ebc466125a516e305f91682c
Tested-by: Marc Zyngier <maz@kernel.org>
Fixes: a9ed4a6560b8 ("epoll: Keep a reference on files added to the check list")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2123625
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 007a0c2ffdb9096bcc99f0a49da67ad8e2e114bf)
fs/eventpoll.c