Skip to content

Commit

Permalink
[PATCH] ipmi: fix event queue limit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Corey Minyard authored and Linus Torvalds committed Apr 11, 2006
1 parent 091e881 commit 4791c03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 4791c03

Please sign in to comment.