From: Corey Minyard Date: Tue, 29 Apr 2008 08:01:01 +0000 (-0700) Subject: ipmi: hold ATTN until upper layer ready X-Git-Tag: v2.6.26-rc1~529 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ea18425436e7c72716b7f8d314775f399821195;p=linux-2.6 ipmi: hold ATTN until upper layer ready Hold handling of ATTN until the upper layer has reported that it is ready. Signed-off-by: Corey Minyard Cc: Patrick Schoeller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 4f560d0bb8..1a8c1ca905 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -723,8 +723,11 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info, si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0); } - /* We prefer handling attn over new messages. */ - if (si_sm_result == SI_SM_ATTN) + /* + * We prefer handling attn over new messages. But don't do + * this if there is not yet an upper layer to handle anything. + */ + if (likely(smi_info->intf) && si_sm_result == SI_SM_ATTN) { unsigned char msg[2];