[Devel] [PATCH RH8] ve/fs/binfmt: clean bm_data reference from ve on err path

Alexander Mikhalitsyn alexander.mikhalitsyn at virtuozzo.com
Tue Aug 31 16:18:07 MSK 2021


Fixes: 90fb0e274 ("ve/fs/binfmt: virtualization")

https://jira.sw.ru/browse/PSBM-131994

Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
---
 fs/binfmt_misc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 2b586d61f4a9..21cbd8b13ec4 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -868,6 +868,7 @@ static int bm_fill_super(struct super_block *sb, struct fs_context *fc)
 
 	err = simple_fill_super(sb, BINFMTFS_MAGIC, bm_files);
 	if (err) {
+		ve->binfmt_misc = NULL;
 		kfree(bm_data);
 		return err;
 	}
-- 
2.28.0



More information about the Devel mailing list