The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear 
at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.55
------>
commit f564bdbaed7ee8c6f28404f5de347cc29275e2df
Author: Alexander Mikhalitsyn <[email protected]>
Date:   Tue Mar 30 10:28:19 2021 +0300

    sync: sync_collect_filesystems: fix possible infinite loop
    
    https://jira.sw.ru/browse/PSBM-127599
    Fixes: ("proc/mounts: add cursor")
    Signed-off-by: Alexander Mikhalitsyn <[email protected]>
    
    (cherry picked from vz7 commit 9f4f95d6878e ("sync:
    sync_collect_filesystems: fix possible infinite loop")
    
    Signed-off-by: Konstantin Khorenko <[email protected]>
---
 fs/sync.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/sync.c b/fs/sync.c
index e69c3c34712c..553c5ebf102e 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -137,7 +137,7 @@ static int sync_collect_filesystems(struct ve_struct *ve, 
struct list_head *sync
        mnt = mnt_list_next(mnt_ns, &mnt_ns->list);
        while (mnt) {
                if (sync_filesystem_collected(sync_list, mnt->mnt.mnt_sb))
-                       continue;
+                       goto next;
 
                ss = kmalloc(sizeof(*ss), GFP_KERNEL);
                if (ss == NULL) {
@@ -155,6 +155,7 @@ static int sync_collect_filesystems(struct ve_struct *ve, 
struct list_head *sync
                spin_unlock(&sb_lock);
                list_add_tail(&ss->list, sync_list);
 
+next:
                mnt = mnt_list_next(mnt_ns, &mnt->mnt_list);
        }
        up_read(&namespace_sem);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to