Andrei Vagin <avagin@xxxxxxxxxx> wrote: > @@ -3435,9 +3435,6 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, unsigned int, ms_flags > * do any memory allocation or anything like that at this point as we > * don't want to have to handle any errors incurred. > */ > - if (fc->ops && fc->ops->free) > - fc->ops->free(fc); > - fc->fs_private = NULL; > fc->s_fs_info = NULL; > fc->sb_flags = 0; > fc->sloppy = false; This isn't the right fix. The context needs to be reset at this point so that it's prepared to be reinitialised into in the same state as one generated by fspick(). I can do this two ways: (1) stick a flag in the context that says if ->free() needs calling, (2) make all the ->free() routines aware that they may see the reset state. I think (1) is less error prone. David