1
0
Fork 0
alistair23-linux/drivers/char/ipmi
Hidehiro Kawai 82802f968b ipmi: Don't flush messages in sender() in run-to-completion mode
When flushing queued messages in run-to-completion mode,
smi_event_handler() is recursively called.

flush_messages()
 smi_event_handler()
  handle_transaction_done()
   deliver_recv_msg()
    ipmi_smi_msg_received()
     smi_recv_tasklet()
      sender()
       flush_messages()
        smi_event_handler()
         ...

The depth of the recursive call depends on the number of queued
messages, so it can cause a stack overflow if many messages have
been queued.

To solve this problem, this patch removes flush_messages()
from sender()@ipmi_si_intf.c.  Instead, add flush_messages() to
caller side of sender() if needed.  Additionally, to implement this,
add new handler flush_messages to struct ipmi_smi_handlers.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>

Fixed up a comment and some spacing issues.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
2015-09-03 15:02:28 -05:00
..
Kconfig drivers/char/ipmi: Add powernv IPMI driver 2014-12-11 15:04:12 -06:00
Makefile drivers/char/ipmi: Add powernv IPMI driver 2014-12-11 15:04:12 -06:00
ipmi_bt_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_devintf.c ipmi: Free ipmi_recv_msg messages from the linked list on close 2015-02-19 20:58:40 -06:00
ipmi_kcs_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_msghandler.c ipmi: Don't flush messages in sender() in run-to-completion mode 2015-09-03 15:02:28 -05:00
ipmi_powernv.c impi:Remove unneeded setting of module owner to THIS_MODULE in the platform structure, powernv_ipmi_driver 2015-09-03 15:02:24 -05:00
ipmi_poweroff.c char: Convert use of typedef ctl_table to struct ctl_table 2013-06-17 16:43:08 -07:00
ipmi_si_intf.c ipmi: Don't flush messages in sender() in run-to-completion mode 2015-09-03 15:02:28 -05:00
ipmi_si_sm.h ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_smic_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_ssif.c ipmi: constify SSIF ACPI device ids 2015-09-03 15:02:26 -05:00
ipmi_watchdog.c kernel/params: constify struct kernel_param_ops uses 2015-05-28 11:32:10 +09:30