From: Corey Minyard Date: Tue, 11 Apr 2006 05:54:31 +0000 (-0700) Subject: [PATCH] ipmi: fix event queue limit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4791c03d2c3b9b6822784f6d7c8e5bbadb1f35ae;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) list_del(&msg->link); list_add_tail(&msg->link, &msgs); } + intf->waiting_events_count = 0; } /* Hold the events lock while doing this to preserve order. */ @@ -2916,6 +2917,7 @@ static int handle_read_event_rsp(ipmi_smi_t intf, copy_event_into_recv_msg(recv_msg, msg); list_add_tail(&(recv_msg->link), &(intf->waiting_events)); + intf->waiting_events_count++; } else { /* There's too many things in the queue, discard this message. */