>> +#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.

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to