* + ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch added to -mm tree
@ 2010-05-25 18:00 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-05-25 18:00 UTC (permalink / raw)
To: mm-commits; +Cc: jkosina, minyard
The patch titled
ipmi: handle run_to_completion properly in deliver_recv_msg()
has been added to the -mm tree. Its filename is
ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: ipmi: handle run_to_completion properly in deliver_recv_msg()
From: Jiri Kosina <jkosina@suse.cz>
If run_to_completion flag is set, it means that we are running in a
single-threaded mode, and thus no locks are held.
This fixes a deadlock when IPMI notifier is being called during panic.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/ipmi/ipmi_si_intf.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff -puN drivers/char/ipmi/ipmi_si_intf.c~ipmi-handle-run_to_completion-properly-in-deliver_recv_msg drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~ipmi-handle-run_to_completion-properly-in-deliver_recv_msg
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -323,9 +323,14 @@ static void deliver_recv_msg(struct smi_
{
/* Deliver the message to the upper layer with the lock
released. */
- spin_unlock(&(smi_info->si_lock));
- ipmi_smi_msg_received(smi_info->intf, msg);
- spin_lock(&(smi_info->si_lock));
+
+ if (smi_info->run_to_completion) {
+ ipmi_smi_msg_received(smi_info->intf, msg);
+ } else {
+ spin_unlock(&(smi_info->si_lock));
+ ipmi_smi_msg_received(smi_info->intf, msg);
+ spin_lock(&(smi_info->si_lock));
+ }
}
static void return_hosed_msg(struct smi_info *smi_info, int cCode)
_
Patches currently in -mm which might be from jkosina@suse.cz are
origin.patch
linux-next.patch
acpi-video-fix-acpi_backlight=video.patch
ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-25 18:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 18:00 + ipmi-handle-run_to_completion-properly-in-deliver_recv_msg.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox