* [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params is null
@ 2009-03-24 0:41 Paul Walmsley
2009-03-25 0:35 ` [APPLIED] [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Paul Walmsley @ 2009-03-24 0:41 UTC (permalink / raw)
To: linux-omap; +Cc: Peter Barada
omap2_sdrc_get_params() should check to see if a board-*.c file has
called omap2_init_common_hw() with a null pointer for the
omap_sdrc_params argument, rather than attempting to dereference it.
Otherwise, boot will fail after the "Reprogramming SDRC" boot message.
Problem found by Peter Barada <peterb@logicpd.com>.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Peter Barada <peterb@logicpd.com>
---
arch/arm/mach-omap2/sdrc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
index 7da6587..993fd25 100644
--- a/arch/arm/mach-omap2/sdrc.c
+++ b/arch/arm/mach-omap2/sdrc.c
@@ -56,6 +56,9 @@ struct omap_sdrc_params *omap2_sdrc_get_params(unsigned long r)
{
struct omap_sdrc_params *sp;
+ if (!sdrc_init_params)
+ return NULL;
+
sp = sdrc_init_params;
while (sp->rate && sp->rate != r)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [APPLIED] [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params
2009-03-24 0:41 [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params is null Paul Walmsley
@ 2009-03-25 0:35 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2009-03-25 0:35 UTC (permalink / raw)
To: linux-omap
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Commit: c4df5a4d436bc3aea65cc665025d5ce62c8dfe09
PatchWorks
http://patchwork.kernel.org/patch/13863/
Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=c4df5a4d436bc3aea65cc665025d5ce62c8dfe09
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-25 0:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-24 0:41 [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params is null Paul Walmsley
2009-03-25 0:35 ` [APPLIED] [PATCH] SDRC: prevent null pointer dereference if sdrc_init_params Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).