Merge commit '7438410328547d8f55b6555ebdcfd9768978fcb9' into patch_branch

Change-Id: Idc4f0d63865479d4e3b85069270c6c21d52a747d
diff --git a/real_system_state.cc b/real_system_state.cc
index f576c6c..9474741 100644
--- a/real_system_state.cc
+++ b/real_system_state.cc
@@ -184,6 +184,17 @@
     return false;
   }
 
+  // For devices that are not rollback enabled (ie. consumer devices),
+  // initialize max kernel key version to 0xfffffffe, which is logically
+  // infinity.
+  if (policy_provider_.IsConsumerDevice()) {
+    if (!hardware()->SetMaxKernelKeyRollforward(
+            chromeos_update_manager::kRollforwardInfinity)) {
+      LOG(ERROR) << "Failed to set kernel_max_rollforward to infinity for"
+                 << " consumer devices";
+    }
+  }
+
   // All is well. Initialization successful.
   return true;
 }