x86/alternatives: Guard NOPs optimization
[deliverable/linux.git] / arch / x86 / kernel / alternative.c
index 7c4ad005d7a0a5467ac980a5ae0d89f2ebdc4678..aef65319316065eab845f35141682c3550f18a22 100644 (file)
@@ -325,6 +325,9 @@ done:
 
 static void __init_or_module optimize_nops(struct alt_instr *a, u8 *instr)
 {
+       if (instr[0] != 0x90)
+               return;
+
        add_nops(instr + (a->instrlen - a->padlen), a->padlen);
 
        DUMP_BYTES(instr, a->instrlen, "%p: [%d:%d) optimized NOPs: ",
This page took 0.033883 seconds and 5 git commands to generate.