Skip to content

Commit

Permalink
x86: fix runtime error in arch/x86/kernel/cpu/mcheck/mce_amd_64.c
Browse files Browse the repository at this point in the history
This problem is due to the kobject rework recently done in this file.

The mce_amd_64.c code uses some wierd forward calls to back out of the
recursive way the code creates kobjects.  Because of this, we need to
verify that we have really created a kobject before calling
kobject_uevent().

Many thanks to Yinghai Lu <yhlu.kernel@gmail.com> for reporting the
problem and testing.

Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jacob Shin <jacob.shin@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jan 27, 2008
1 parent 4e886c2 commit 404aae5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/cpu/mcheck/mce_amd_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
if (err)
goto out_free;

kobject_uevent(&b->kobj, KOBJ_ADD);
if (b)
kobject_uevent(&b->kobj, KOBJ_ADD);

return err;

Expand Down

0 comments on commit 404aae5

Please sign in to comment.