]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/xfs/xfs_log.c
xfs: fix mount failure crash on invalid iclog memory access
[mirror_ubuntu-bionic-kernel.git] / fs / xfs / xfs_log.c
index a503af96d780ecf9fd15f6c6d579bc9822abac6f..2dde89fa1ffae48803a0dedbdc1af9576b147490 100644 (file)
@@ -1568,6 +1568,8 @@ out_free_iclog:
                if (iclog->ic_bp)
                        xfs_buf_free(iclog->ic_bp);
                kmem_free(iclog);
+               if (prev_iclog == log->l_iclog)
+                       break;
        }
        spinlock_destroy(&log->l_icloglock);
        xfs_buf_free(log->l_xbuf);