Subject: Re: [PATCH] Don't panic when EEH_MAX_FAILS is exceeded

From: Nathan Lynch <[email-masked]>
Date: Sun, 20 Jul 2008 15:17:08 -0500

Sean MacLennan wrote:
> On Sun, 20 Jul 2008 11:28:36 -0700
> "Mike Mason" <[email-masked]> wrote:
> 
> > This patch changes the EEH_MAX_FAILS action from panic to printing an
> > error message.  Panicking under under this condition is too harsh.
> > Although performance will be affected and the device may not recover,
> > the system is still running, which at the very least, should allow
> > for a more graceful shutdown.  The panic() is now wrapped in a DEBUG
> > statement for development purposes.  The patch also removes the
> > msleep() within a spinlock, which is not allowed.
> 
> Why can you not msleep within a spinlock? And when was this change
> brought in?

Giving up the cpu while holding a spinlock risks locking up the system
in the worst case -- if another task tries to acquire the held lock it
can spin indefinitely.