aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2006-04-11 01:54:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:45 -0400
commit4791c03d2c3b9b6822784f6d7c8e5bbadb1f35ae (patch)
tree9200001570ecf30f13e2adcfb62110109bf26f7e /drivers/char/ipmi/ipmi_msghandler.c
parent091e881d0e55496d8887b61446ae1c598b0995b6 (diff)
[PATCH] ipmi: fix event queue limit
The event handler mechanism in the IPMI driver had a limit on the number of received events, but the counts were not being updated. Update the counts to impose a limit. This is not a critical fix, as this function (the sending of the events) has to be turned on by the user, anyway. This avoids problems if they forget to turn it back off. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 0ded046d5aa8..9f2f8fdec69a 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -941,6 +941,7 @@ int ipmi_set_gets_events(ipmi_user_t user, int val)
941 list_del(&msg->link); 941 list_del(&msg->link);
942 list_add_tail(&msg->link, &msgs); 942 list_add_tail(&msg->link, &msgs);
943 } 943 }
944 intf->waiting_events_count = 0;
944 } 945 }
945 946
946 /* Hold the events lock while doing this to preserve order. */ 947 /* Hold the events lock while doing this to preserve order. */
@@ -2916,6 +2917,7 @@ static int handle_read_event_rsp(ipmi_smi_t intf,
2916 2917
2917 copy_event_into_recv_msg(recv_msg, msg); 2918 copy_event_into_recv_msg(recv_msg, msg);
2918 list_add_tail(&(recv_msg->link), &(intf->waiting_events)); 2919 list_add_tail(&(recv_msg->link), &(intf->waiting_events));
2920 intf->waiting_events_count++;
2919 } else { 2921 } else {
2920 /* There's too many things in the queue, discard this 2922 /* There's too many things in the queue, discard this
2921 message. */ 2923 message. */