Skip to contentSkip to conversation

Regression, bisected: hyperv shutdown panics guest

DISCUSSION Florian Westphal 2 participants 2 messages Feb 7, 2013

lore
Share & tools
lore
#0 lore raw

With 3.7, hyperv guest shutdown no longer works.
Instead, guest kernel throws a bunch of "BUG: scheduling-while-atomic" errors and then dies.

reverting

commit 6c0c0d4d1080840eabb3d055d2fd81911111c5fd
Author: hongfeng <[email protected]>
Date: Thu Oct 4 17:12:25 2012 -0700
poweroff: fix bug in orderly_poweroff()

fixes this problem.

Greping for users of orderly_poweroff() shows that hyperv isn't the only caller that invokes the function from irq context.

In fact, kdoc for orderly_poweroff says:

* This may be called from any context to trigger a system shutdown.
* If the orderly shutdown fails, it will force an immediate shutdown.

Any suggestions on how to properly fix this?

Thanks,
Florian

#1 lore raw
Quoted 28 lines

-----Original Message-----
From: Florian Westphal [mailto:[email protected]]
Sent: Thursday, February 07, 2013 5:54 AM
To: Feng Hong
Cc: [email protected]; Kees Cook; [email protected]; KY Srinivasan; Haiyang Zhang
Subject: Regression, bisected: hyperv shutdown panics guest

With 3.7, hyperv guest shutdown no longer works.
Instead, guest kernel throws a bunch of "BUG: scheduling-while-atomic" errors and then dies.

reverting

commit 6c0c0d4d1080840eabb3d055d2fd81911111c5fd
Author: hongfeng <[email protected]>
Date: Thu Oct 4 17:12:25 2012 -0700
poweroff: fix bug in orderly_poweroff()

fixes this problem.

Greping for users of orderly_poweroff() shows that hyperv isn't the only caller that invokes the function from irq context.

In fact, kdoc for orderly_poweroff says:

Quoted 8 lines

* This may be called from any context to trigger a system shutdown.
* If the orderly shutdown fails, it will force an immediate shutdown.

Any suggestions on how to properly fix this?

Thanks,
Florian

A patch has been submitted to fix this problem. It is in Greg's queue:
Subject: Re: [PATCH 6/6] Drivers: hv: Execute shutdown in a thread context

Regards,

K. Y