hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8JUUC?from=project-issue
--------------------------------
Inode reference count leakage exists in dump_dirtypages_sb() function. Executing iput(inode) in advance to avoid this problem.
Fixes: aeb96447becc ("fs/dirty_pages: dump the number of dirty pages for each inode") Signed-off-by: Zizhi Wo wozizhi@huawei.com --- fs/dirty_pages.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/fs/dirty_pages.c b/fs/dirty_pages.c index 0eb818b599ba..b0cf442c5730 100644 --- a/fs/dirty_pages.c +++ b/fs/dirty_pages.c @@ -159,6 +159,7 @@ static void dump_dirtypages_sb(struct super_block *sb, struct seq_file *m) if (m->size <= m->count) { seq_set_overflow(m); strncpy(m->buf+m->count-12, "terminated\n\0", 12); + iput(inode); goto done; } seq_printf(m, "FSType: %s, Dev ID: %u(%u:%u) ino %lu, dirty pages %lu, path %s\n",
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3020 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3020 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/2...