Bug 676413

Summary: Missing break; from case statement code causes int3 system break.
Product: [Fedora] Fedora Reporter: Matt Gulick <matt.gulick>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-11 19:53:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt Gulick 2011-02-09 19:10:39 UTC
Description of problem: 
System hang on shutdown/reboot due to int3

Version-Release number of selected component (if applicable):
.\kernel-2.6.35.fc14\linux-2.6.35.x86_64\arch\x86\kernel\reboot.c

How reproducible:
100%

Steps to Reproduce:
1. Boot Fedora 14
2. Pull-down menu shutdown
3. Choose Restart
  
Actual results:
System hang

Expected results:
System Reboot

Additional info:
static void native_machine_emergency_restart(void) - Lines 562-579

	for (;;) {
		/* Could also try the reset bit in the Hammer NB */
		switch (reboot_type) {
		case BOOT_KBD:
			mach_reboot_fixups(); /* for board specific fixups */

			for (i = 0; i < 10; i++) {
				kb_wait();
				udelay(50);
				outb(0xfe, 0x64); /* pulse reset low */
				udelay(50);
			}

Note:  The “break;” for the “case BOOT_KBD:” statement is missing.
The code just falls through to handle a “Triple Fault”

		case BOOT_TRIPLE:
			load_idt(&no_idt);
			__asm__ __volatile__("int3");

			reboot_type = BOOT_KBD;
			break;
		{…}
	}

Comment 1 Matt Gulick 2011-02-10 01:51:40 UTC
Instead of dropping through to BOOT_TRIPLE, add the following:

			reboot_type = BOOT_CF9;
			break;

That also eliminates the need for all the DMI exclusions listed in the same source code.

Comment 2 Matt Gulick 2011-02-10 13:48:39 UTC
Further investigation shows that this only an issue for Truly Headless systems with either No KBC at Port 64h or it is disabled for headless operation.

Comment 3 Chuck Ebbert 2011-02-11 02:37:34 UTC
I don't think we can change the default order there - it would mean every machine would try the PCI method if keyboard controller failed. Try adding "reboot=pci" to the boot options instead.

Comment 4 Josh Boyer 2011-08-24 15:11:41 UTC
Did you try the option Chuck suggested in comment #3?