Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=213eca7f4888e9817e8076cdab6b9f7295c181f6
Commit:     213eca7f4888e9817e8076cdab6b9f7295c181f6
Parent:     85004cc367abc000aa36c0d0e270ab609a68b0cb
Author:     Greg KH <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:29:58 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:29:58 2008 +0100

    kobj: fix threshold_init_device/kobject_uevent_env oops
    
    the logic in this function is just crazy.  It's recursive, but we
    can circumvent the creation for the kobject and whole creation of the
    threshold_block if some conditions are met.  That's why we see the
    allocate_threshold_blocks so many times in the callstack, yet only a few
    kobjects created.
    
    Then we blow up in kobject_uevent_env() on the first debug printk.
    Which means that we are just passing in garbage.
    
    Man, this is one time that comments in code would have been very nice to
    have, and why forward goto's into major code blocks are just evil...
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mcheck/mce_amd_64.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c 
b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index 7535887..073afa7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -450,7 +450,8 @@ recurse:
        if (err)
                goto out_free;
 
-       kobject_uevent(&b->kobj, KOBJ_ADD);
+       if (b)
+               kobject_uevent(&b->kobj, KOBJ_ADD);
 
        return err;
 
-
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