[Devel] [PATCH vz8 v2] binfmt_misc: fix mount after umount in CT

Nikita Yushchenko nikita.yushchenko at virtuozzo.com
Tue Oct 19 22:26:50 MSK 2021


 >> +#ifdef CONFIG_VE
 >> +		ve->binfmt_misc = bm_data;
 >> +		/* this will be cleared by ve_destroy() */
 >> +#endif
 >> +	}
 >>
 >>   	err = simple_fill_super(sb, BINFMTFS_MAGIC, bm_files);
 >> -	if (err) {
 >> -		kfree(bm_data);
 >> +	if (err)
 >>   		return err;
 >> -	}
 >
 > I do not have vz8 three, so I'm sorry for dump question:
 > if we failed here, who will free bm_data and clean up ve->binfmt_misc?

Just read a comment several lines above ;)

ve->bm_data is global, not per-mount. It is created at first mount (successful or not) and cleared at VE 
destroy time.



More information about the Devel mailing list