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

2021-10-19 Thread Alexander Mikhalitsyn
On Tue, 19 Oct 2021 16:44:20 +0300 Nikita Yushchenko wrote: > >> - bm_data = kzalloc(sizeof(struct binfmt_misc), GFP_KERNEL); > >> - if (!bm_data) > >> - return -ENOMEM; > >> + INIT_LIST_HEAD(_data->entries); > >> + rwlock_init(_data->entries_lock); > >> > >> -

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

2021-10-19 Thread Nikita Yushchenko
- bm_data = kzalloc(sizeof(struct binfmt_misc), GFP_KERNEL); - if (!bm_data) - return -ENOMEM; + INIT_LIST_HEAD(_data->entries); + rwlock_init(_data->entries_lock); - INIT_LIST_HEAD(_data->entries); -

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

2021-10-19 Thread Alexander Mikhalitsyn
On Tue, 19 Oct 2021 13:59:34 +0300 Alexander Mikhalitsyn wrote: > On Mon, 18 Oct 2021 19:51:49 +0300 > Nikita Yushchenko wrote: > > > The assumption that bm_fill_super() is not called for the second time > > for CT is wrong: umount operation clears sb->s_root, which causes > > vfs_get_super()

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

2021-10-19 Thread Alexander Mikhalitsyn
On Mon, 18 Oct 2021 19:51:49 +0300 Nikita Yushchenko wrote: > The assumption that bm_fill_super() is not called for the second time > for CT is wrong: umount operation clears sb->s_root, which causes > vfs_get_super() to call fill_super again on the next mount. > > Make bm_fill_super() handle

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

2021-10-18 Thread Nikita Yushchenko
It shall be [PATCH vz8] - sorry for missing that. vz7/vz8/vz9? -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 18.10.2021 19:51, Nikita Yushchenko wrote: The assumption that bm_fill_super() is not called for the second time for CT is wrong: umount operation clears

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

2021-10-18 Thread Konstantin Khorenko
vz7/vz8/vz9? -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 18.10.2021 19:51, Nikita Yushchenko wrote: The assumption that bm_fill_super() is not called for the second time for CT is wrong: umount operation clears sb->s_root, which causes vfs_get_super() to call

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

2021-10-18 Thread Nikita Yushchenko
The assumption that bm_fill_super() is not called for the second time for CT is wrong: umount operation clears sb->s_root, which causes vfs_get_super() to call fill_super again on the next mount. Make bm_fill_super() handle multiple-calls corrently: - initialize bm_data and set ve->binfmt_misc