* [PATCH] fix oprofile module unloading
@ 2006-04-21 14:35 Atsushi Nemoto
2006-04-24 9:50 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2006-04-21 14:35 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
When unloading oprofile module with timer-mode, oprofile_arch_exit
dereferences a NULL pointer. This patch fixes it and also fix a
sparse warning.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index 935dd85..f2b4862 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -27,7 +27,7 @@ static int op_mips_setup(void)
model->reg_setup(ctr);
/* Configure the registers on all cpus. */
- on_each_cpu(model->cpu_setup, 0, 0, 1);
+ on_each_cpu(model->cpu_setup, NULL, 0, 1);
return 0;
}
@@ -114,5 +114,6 @@ int __init oprofile_arch_init(struct opr
void oprofile_arch_exit(void)
{
- model->exit();
+ if (model)
+ model->exit();
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-24 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-21 14:35 [PATCH] fix oprofile module unloading Atsushi Nemoto
2006-04-24 9:50 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox