lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 19 Jun 2020 00:27:10 +0900 From: Wang Shilong <wangshilong1991@...il.com> To: linux-ext4@...r.kernel.org Cc: lixi@....com, adilger@...ger.ca, wangshilong1991@...il.com, sihara@....com, Wang Shilong <wshilong@....com> Subject: [RFC PATCH v2 07/51] e2fsck: clear icache when using multi-thread fsck From: Li Xi <lixi@....com> icache of fs will be rebuilt when needed, so after copying fs, icache can be inited to NULL. Signed-off-by: Li Xi <lixi@....com> Signed-off-by: Wang Shilong <wshilong@....com> --- e2fsck/pass1.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index b212cdde..22597b12 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2102,6 +2102,13 @@ static errcode_t e2fsck_pass1_copy_fs(ext2_filsys dest, ext2_filsys src) dest->inode_map->fs = dest; if (dest->block_map) dest->block_map->fs = dest; + + /* icache will be rebuilt if needed, so do not copy from @src */ + if (src->icache) { + ext2fs_free_inode_cache(src->icache); + src->icache = NULL; + } + dest->icache = NULL; return 0; } @@ -2116,6 +2123,13 @@ static void e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) dest->inode_map->fs = dest; if (dest->block_map) dest->block_map->fs = dest; + + /* icache will be rebuilt if needed, so do not copy from @src */ + if (src->icache) { + ext2fs_free_inode_cache(src->icache); + src->icache = NULL; + } + dest->icache = NULL; } static errcode_t e2fsck_pass1_thread_prepare(e2fsck_t global_ctx, e2fsck_t *thread_ctx) -- 2.25.4
Powered by blists - more mailing lists