Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=41c57a87183a7c458d86f78966d69d4bf18ea0b7
Commit:     41c57a87183a7c458d86f78966d69d4bf18ea0b7
Parent:     fa8609da993b04dc2dd762173a6d0ab1a192e256
Author:     David Barksdale <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 30 14:36:25 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 30 16:01:36 2007 -0800

    [PATCH] IPMI: fix timeout list handling
    
    Fix a dangling pointer bug in ipmi_timeout_handler.  A list of timedout
    messages is not re-initialized before reuse, causing the head of the list
    to point to freed memory.
    
    Signed-off-by: David Barksdale <[EMAIL PROTECTED]>
    Signed-off-by: Corey Minyard <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/ipmi/ipmi_msghandler.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c 
b/drivers/char/ipmi/ipmi_msghandler.c
index 4e4691a..53582b5 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -3649,8 +3649,6 @@ static void ipmi_timeout_handler(long timeout_period)
        unsigned long        flags;
        int                  i;
 
-       INIT_LIST_HEAD(&timeouts);
-
        rcu_read_lock();
        list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
                /* See if any waiting messages need to be processed. */
@@ -3671,6 +3669,7 @@ static void ipmi_timeout_handler(long timeout_period)
                /* Go through the seq table and find any messages that
                   have timed out, putting them in the timeouts
                   list. */
+               INIT_LIST_HEAD(&timeouts);
                spin_lock_irqsave(&intf->seq_lock, flags);
                for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++)
                        check_msg_timeout(intf, &(intf->seq_table[i]),
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to