Message ID | 20180708210154.10423-8-ebiggers3@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/fs_context.c b/fs/fs_context.c index 7a8d1ed34ae71..206256be9777e 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -504,6 +504,9 @@ static void legacy_fs_context_free(struct fs_context *fc) kfree(ctx->legacy_data); break; } + /* This doesn't use fs_private, so need to manually zero for fsmount */ + BUILD_BUG_ON(offsetof(struct legacy_fs_context, fc) != 0); + memset(fc + 1, 0, sizeof(*ctx) - sizeof(*fc)); } /*