* [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode
@ 2015-04-23 2:16 Hidehiro Kawai
2015-04-24 13:00 ` Corey Minyard
0 siblings, 1 reply; 5+ messages in thread
From: Hidehiro Kawai @ 2015-04-23 2:16 UTC (permalink / raw)
To: Corey Minyard; +Cc: openipmi-developer, linux-kernel
start_next_msg() issues a message placed in smi_info->waiting_msg
if it is non-NULL. However, sender() sets a message to
smi_info->curr_msg and NULL to smi_info->waiting_msg in the context
of run_to_completion mode. As the result, it leads an infinite
loop by waiting the completion of unissued message when leaving
dying message after kernel panic.
sender() should set the message to smi_info->waiting_msg not
curr_msg.
Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
---
drivers/char/ipmi/ipmi_si_intf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 5e90a18..3d49c70 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -942,8 +942,7 @@ static void sender(void *send_info,
* If we are running to completion, start it and run
* transactions until everything is clear.
*/
- smi_info->curr_msg = msg;
- smi_info->waiting_msg = NULL;
+ smi_info->waiting_msg = msg;
/*
* Run to completion means we are single-threaded, no
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode
2015-04-23 2:16 [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode Hidehiro Kawai
@ 2015-04-24 13:00 ` Corey Minyard
2015-04-28 12:41 ` Hidehiro Kawai
0 siblings, 1 reply; 5+ messages in thread
From: Corey Minyard @ 2015-04-24 13:00 UTC (permalink / raw)
To: Hidehiro Kawai; +Cc: openipmi-developer, linux-kernel
Ah, yes, you are correct. Queued for 4.1. Thanks.
-corey
On 04/22/2015 09:16 PM, Hidehiro Kawai wrote:
> start_next_msg() issues a message placed in smi_info->waiting_msg
> if it is non-NULL. However, sender() sets a message to
> smi_info->curr_msg and NULL to smi_info->waiting_msg in the context
> of run_to_completion mode. As the result, it leads an infinite
> loop by waiting the completion of unissued message when leaving
> dying message after kernel panic.
>
> sender() should set the message to smi_info->waiting_msg not
> curr_msg.
>
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Corey Minyard <minyard@acm.org>
> Cc: openipmi-developer@lists.sourceforge.net
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/char/ipmi/ipmi_si_intf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 5e90a18..3d49c70 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -942,8 +942,7 @@ static void sender(void *send_info,
> * If we are running to completion, start it and run
> * transactions until everything is clear.
> */
> - smi_info->curr_msg = msg;
> - smi_info->waiting_msg = NULL;
> + smi_info->waiting_msg = msg;
>
> /*
> * Run to completion means we are single-threaded, no
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode
2015-04-24 13:00 ` Corey Minyard
@ 2015-04-28 12:41 ` Hidehiro Kawai
2015-05-06 12:27 ` Corey Minyard
0 siblings, 1 reply; 5+ messages in thread
From: Hidehiro Kawai @ 2015-04-28 12:41 UTC (permalink / raw)
To: minyard; +Cc: openipmi-developer, linux-kernel
Hello,
(2015/04/24 22:00), Corey Minyard wrote:
> Ah, yes, you are correct. Queued for 4.1. Thanks.
Thank you for the review.
By the way, I'm planning some enhancements of IPMI driver
in panic context. Currently, we can call panic notifiers
before crash_kexec() by specifying crash_kexec_post_notifiers
as a boot parameter. By utilizing this feature, we can write
SEL records before entering kdump process; we can save some
information even if kdump fails. Here, notifier calls
shouldn't prevent the kdump process. So, the reliability of
panic notifier calls is very important.
I noticed that there are possible infinite loops in the
panic notifier call of IPMI driver (we assume BMC is
unreliable). To evict possible infinite loops, I'm considering
introducing some retry timeout or retry count limit to the
run_to_completion procedure.
Do you have any opinions?
--
Hidehiro Kawai
Hitachi, Ltd. Research & Development Group
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode
2015-04-28 12:41 ` Hidehiro Kawai
@ 2015-05-06 12:27 ` Corey Minyard
2015-05-07 12:01 ` Hidehiro Kawai
0 siblings, 1 reply; 5+ messages in thread
From: Corey Minyard @ 2015-05-06 12:27 UTC (permalink / raw)
To: Hidehiro Kawai; +Cc: openipmi-developer, linux-kernel
On 04/28/2015 07:41 AM, Hidehiro Kawai wrote:
> Hello,
>
> (2015/04/24 22:00), Corey Minyard wrote:
>> Ah, yes, you are correct. Queued for 4.1. Thanks.
> Thank you for the review.
>
> By the way, I'm planning some enhancements of IPMI driver
> in panic context. Currently, we can call panic notifiers
> before crash_kexec() by specifying crash_kexec_post_notifiers
> as a boot parameter. By utilizing this feature, we can write
> SEL records before entering kdump process; we can save some
> information even if kdump fails. Here, notifier calls
> shouldn't prevent the kdump process. So, the reliability of
> panic notifier calls is very important.
I thought these were called before crash_kexec(). But if not that would
be a good enhancement.
> I noticed that there are possible infinite loops in the
> panic notifier call of IPMI driver (we assume BMC is
> unreliable). To evict possible infinite loops, I'm considering
> introducing some retry timeout or retry count limit to the
> run_to_completion procedure.
>
> Do you have any opinions?
That's probably a good idea. My thought was to keep trying in hopes of
getting something out, but you are probably right, a timeout after a few
minutes is probably appropriate.
-corey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode
2015-05-06 12:27 ` Corey Minyard
@ 2015-05-07 12:01 ` Hidehiro Kawai
0 siblings, 0 replies; 5+ messages in thread
From: Hidehiro Kawai @ 2015-05-07 12:01 UTC (permalink / raw)
To: minyard; +Cc: openipmi-developer, linux-kernel
(2015/05/06 21:27), Corey Minyard wrote:
> On 04/28/2015 07:41 AM, Hidehiro Kawai wrote:
>> Hello,
>>
>> I noticed that there are possible infinite loops in the
>> panic notifier call of IPMI driver (we assume BMC is
>> unreliable). To evict possible infinite loops, I'm considering
>> introducing some retry timeout or retry count limit to the
>> run_to_completion procedure.
>>
>> Do you have any opinions?
> That's probably a good idea. My thought was to keep trying in hopes of
> getting something out, but you are probably right, a timeout after a few
> minutes is probably appropriate.
OK, I'll do that as the next task.
Thank you!
--
Hidehiro Kawai
Hitachi, Ltd. Research & Development Group
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-07 12:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 2:16 [PATCH] ipmi: Fix a problem that messages are not issued in run_to_completion mode Hidehiro Kawai
2015-04-24 13:00 ` Corey Minyard
2015-04-28 12:41 ` Hidehiro Kawai
2015-05-06 12:27 ` Corey Minyard
2015-05-07 12:01 ` Hidehiro Kawai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox