diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 2b3565755265dc24aa9f7eb982f5960329180daa..393e59a67381dc82b6eef667f6f788e6ab7ad391 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -421,6 +421,13 @@ static int sb_finish_set_opts(struct super_block *sb)
 	if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0)
 		sbsec->flags |= SE_SBLABELSUPP;
 
+	/*
+	 * Special handling for rootfs. Is genfs but supports
+	 * setting SELinux context on in-core inodes.
+	 */
+	if (strncmp(sb->s_type->name, "rootfs", sizeof("rootfs")) == 0)
+		sbsec->flags |= SE_SBLABELSUPP;
+
 	/* Initialize the root inode. */
 	rc = inode_doinit_with_dentry(root_inode, root);