[RHEL7,COMMIT] lost css_put in hwpoison_filter_task()

Submitted by Konstantin Khorenko on Feb. 26, 2020, 2:49 p.m.

Details

Message ID 202002261449.01QEnOhU021580@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Feb. 26, 2020, 2:49 p.m.
The commit is pushed to "branch-rh7-3.10.0-1062.12.1.vz7.131.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.12.1.vz7.131.4
------>
commit d1dff899501d83081a2b24043f174ed20ef5513b
Author: Vasily Averin <vvs@virtuozzo.com>
Date:   Wed Feb 26 17:49:23 2020 +0300

    lost css_put in hwpoison_filter_task()
    
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 mm/memory-failure.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 643ec1aa8d1f7..b6f47c2e823a2 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -146,9 +146,10 @@  static int hwpoison_filter_task(struct page *p)
 
 	css = mem_cgroup_css(mem);
 	/* root_mem_cgroup has NULL dentries */
-	if (!css->cgroup->dentry)
+	if (!css->cgroup->dentry) {
+		css_put(css);
 		return -EINVAL;
-
+	}
 	ino = css->cgroup->dentry->d_inode->i_ino;
 	css_put(css);