* [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption [not found] <1323678976-4119-1-git-send-email-jarkko.nikula@bitmer.com> @ 2011-12-12 8:38 ` Jarkko Nikula 2011-12-12 10:23 ` Igor Grinberg 0 siblings, 1 reply; 7+ messages in thread From: Jarkko Nikula @ 2011-12-12 8:38 UTC (permalink / raw) To: linux-omap; +Cc: linux-arm-kernel, tony, neilb, Jarkko Nikula Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src") and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions") incorrectly set two struct omap_mcbsp_platform_data fields after omap_device_build_ss and kfree calls. Fix this by moving these pdata assignments before those calls. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Reported-by: neilb@suse.de --- For 3.2, 3.1 is ok. --- arch/arm/mach-omap2/mcbsp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 292eee3..28fcb27 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c @@ -145,6 +145,9 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) pdata->reg_size = 4; pdata->has_ccr = true; } + pdata->set_clk_src = omap2_mcbsp_set_clk_src; + if (id == 1) + pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; if (oh->class->rev == MCBSP_CONFIG_TYPE3) { if (id == 2) @@ -174,9 +177,6 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) name, oh->name); return PTR_ERR(pdev); } - pdata->set_clk_src = omap2_mcbsp_set_clk_src; - if (id == 1) - pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; omap_mcbsp_count++; return 0; } -- 1.7.7.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-12 8:38 ` [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption Jarkko Nikula @ 2011-12-12 10:23 ` Igor Grinberg 2011-12-12 11:22 ` Jarkko Nikula 0 siblings, 1 reply; 7+ messages in thread From: Igor Grinberg @ 2011-12-12 10:23 UTC (permalink / raw) To: Jarkko Nikula; +Cc: linux-omap, linux-arm-kernel, tony, neilb On 12/12/11 10:38, Jarkko Nikula wrote: > Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src") > and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions") > incorrectly set two struct omap_mcbsp_platform_data fields after > omap_device_build_ss and kfree calls. > > Fix this by moving these pdata assignments before those calls. > > Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> > Reported-by: neilb@suse.de Perhaps, should be: Reported-by: NeilBrown <neilb@suse.de> and Cc: <stable@vger.kernel.org> [3.1] as for below. > --- > For 3.2, 3.1 is ok. > --- > arch/arm/mach-omap2/mcbsp.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c > index 292eee3..28fcb27 100644 > --- a/arch/arm/mach-omap2/mcbsp.c > +++ b/arch/arm/mach-omap2/mcbsp.c > @@ -145,6 +145,9 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) > pdata->reg_size = 4; > pdata->has_ccr = true; > } > + pdata->set_clk_src = omap2_mcbsp_set_clk_src; > + if (id == 1) > + pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; > > if (oh->class->rev == MCBSP_CONFIG_TYPE3) { > if (id == 2) > @@ -174,9 +177,6 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) > name, oh->name); > return PTR_ERR(pdev); > } > - pdata->set_clk_src = omap2_mcbsp_set_clk_src; > - if (id == 1) > - pdata->mux_signal = omap2_mcbsp1_mux_rx_clk; > omap_mcbsp_count++; > return 0; > } -- Regards, Igor. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-12 10:23 ` Igor Grinberg @ 2011-12-12 11:22 ` Jarkko Nikula 2011-12-12 11:57 ` Igor Grinberg 0 siblings, 1 reply; 7+ messages in thread From: Jarkko Nikula @ 2011-12-12 11:22 UTC (permalink / raw) To: Igor Grinberg; +Cc: linux-omap, linux-arm-kernel, tony, neilb Hi On 12/12/2011 12:23 PM, Igor Grinberg wrote: > On 12/12/11 10:38, Jarkko Nikula wrote: >> Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src") >> and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions") >> incorrectly set two struct omap_mcbsp_platform_data fields after >> omap_device_build_ss and kfree calls. >> >> Fix this by moving these pdata assignments before those calls. >> >> Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> >> Reported-by: neilb@suse.de > Perhaps, should be: > Reported-by: NeilBrown <neilb@suse.de> > and > Cc: <stable@vger.kernel.org> [3.1] > as for below. >> --- >> For 3.2, 3.1 is ok. >> --- No need to cc stable since the issue is not in stable kernels. -- Jarkko ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-12 11:22 ` Jarkko Nikula @ 2011-12-12 11:57 ` Igor Grinberg 2011-12-12 18:33 ` Tony Lindgren 0 siblings, 1 reply; 7+ messages in thread From: Igor Grinberg @ 2011-12-12 11:57 UTC (permalink / raw) To: Jarkko Nikula; +Cc: linux-omap, linux-arm-kernel, tony, neilb On 12/12/11 13:22, Jarkko Nikula wrote: > Hi > > On 12/12/2011 12:23 PM, Igor Grinberg wrote: >> On 12/12/11 10:38, Jarkko Nikula wrote: >>> Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src") >>> and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions") >>> incorrectly set two struct omap_mcbsp_platform_data fields after >>> omap_device_build_ss and kfree calls. >>> >>> Fix this by moving these pdata assignments before those calls. >>> >>> Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> >>> Reported-by: neilb@suse.de >> Perhaps, should be: >> Reported-by: NeilBrown <neilb@suse.de> >> and >> Cc: <stable@vger.kernel.org> [3.1] >> as for below. >>> --- >>> For 3.2, 3.1 is ok. >>> --- > No need to cc stable since the issue is not in stable kernels. Ah, so I've misunderstood what was that about... So it has been introduced in 3.2-rc cycle. Ok. Then now it is the perfect time to fix this ;) -- Regards, Igor. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-12 11:57 ` Igor Grinberg @ 2011-12-12 18:33 ` Tony Lindgren 2011-12-14 20:50 ` Ramirez Luna, Omar 0 siblings, 1 reply; 7+ messages in thread From: Tony Lindgren @ 2011-12-12 18:33 UTC (permalink / raw) To: Igor Grinberg; +Cc: Jarkko Nikula, linux-omap, linux-arm-kernel, neilb * Igor Grinberg <grinberg@compulab.co.il> [111212 03:25]: > On 12/12/11 13:22, Jarkko Nikula wrote: > > Hi > > > > On 12/12/2011 12:23 PM, Igor Grinberg wrote: > >> On 12/12/11 10:38, Jarkko Nikula wrote: > >>> Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src") > >>> and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions") > >>> incorrectly set two struct omap_mcbsp_platform_data fields after > >>> omap_device_build_ss and kfree calls. > >>> > >>> Fix this by moving these pdata assignments before those calls. > >>> > >>> Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> > >>> Reported-by: neilb@suse.de > >> Perhaps, should be: > >> Reported-by: NeilBrown <neilb@suse.de> > >> and > >> Cc: <stable@vger.kernel.org> [3.1] > >> as for below. > >>> --- > >>> For 3.2, 3.1 is ok. > >>> --- > > No need to cc stable since the issue is not in stable kernels. > > Ah, so I've misunderstood what was that about... > So it has been introduced in 3.2-rc cycle. > Ok. Then now it is the perfect time to fix this ;) Applying into fixes. Regards, Tony ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-12 18:33 ` Tony Lindgren @ 2011-12-14 20:50 ` Ramirez Luna, Omar 2011-12-14 21:54 ` Tony Lindgren 0 siblings, 1 reply; 7+ messages in thread From: Ramirez Luna, Omar @ 2011-12-14 20:50 UTC (permalink / raw) To: Tony Lindgren Cc: Igor Grinberg, Jarkko Nikula, linux-omap, linux-arm-kernel, neilb On Mon, Dec 12, 2011 at 12:33 PM, Tony Lindgren <tony@atomide.com> wrote: > Applying into fixes. FWIW, I was bisecting this issue, the patch fixes the following slab corruptions on boot log: ... hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. hw-breakpoint: maximum watchpoint size is 4 bytes. Slab corruption: size-32 start=eea66740, len=32 010: d8 9d 02 c0 04 9d 02 c0 6b 6b 6b 6b 6b 6b 6b a5 ........kkkkkkk. Prev obj: start=eea66720, len=32 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Next obj: start=eea66760, len=32 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Slab corruption: size-32 start=eea66740, len=32 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. Prev obj: start=eea66720, len=32 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Next obj: start=eea66760, len=32 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Slab corruption: size-32 start=eea66740, len=32 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. Prev obj: start=eea66720, len=32 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Next obj: start=eea66760, len=32 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Slab corruption: size-32 start=eea66740, len=32 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. Prev obj: start=eea66720, len=32 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. Next obj: start=eea66760, len=32 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. OMAP DMA hardware revision 0.0 ... Regards, Omar ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption 2011-12-14 20:50 ` Ramirez Luna, Omar @ 2011-12-14 21:54 ` Tony Lindgren 0 siblings, 0 replies; 7+ messages in thread From: Tony Lindgren @ 2011-12-14 21:54 UTC (permalink / raw) To: Ramirez Luna, Omar Cc: Igor Grinberg, Jarkko Nikula, linux-omap, linux-arm-kernel, neilb * Ramirez Luna, Omar <omar.ramirez@ti.com> [111214 12:18]: > On Mon, Dec 12, 2011 at 12:33 PM, Tony Lindgren <tony@atomide.com> wrote: > > Applying into fixes. > > FWIW, I was bisecting this issue, the patch fixes the following slab > corruptions on boot log: Thanks for the info, I've sent the pull request for the two patches in fixes branch. Regards, Tony > hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. > hw-breakpoint: maximum watchpoint size is 4 bytes. > Slab corruption: size-32 start=eea66740, len=32 > 010: d8 9d 02 c0 04 9d 02 c0 6b 6b 6b 6b 6b 6b 6b a5 ........kkkkkkk. > Prev obj: start=eea66720, len=32 > 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Next obj: start=eea66760, len=32 > 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Slab corruption: size-32 start=eea66740, len=32 > 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. > Prev obj: start=eea66720, len=32 > 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Next obj: start=eea66760, len=32 > 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Slab corruption: size-32 start=eea66740, len=32 > 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. > Prev obj: start=eea66720, len=32 > 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Next obj: start=eea66760, len=32 > 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Slab corruption: size-32 start=eea66740, len=32 > 010: d8 9d 02 c0 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 ....kkkkkkkkkkk. > Prev obj: start=eea66720, len=32 > 000: 6f 6d 61 70 32 5f 6d 63 73 70 69 2e 31 00 5a 5a omap2_mcspi.1.ZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > Next obj: start=eea66760, len=32 > 000: 70 6f 77 65 72 00 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a power.ZZZZZZZZZZ > 010: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a a5 ZZZZZZZZZZZZZZZ. > OMAP DMA hardware revision 0.0 > ... > > Regards, > > Omar ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-14 21:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1323678976-4119-1-git-send-email-jarkko.nikula@bitmer.com>
2011-12-12 8:38 ` [PATCH] ARM: OMAP: mcbsp: Fix possible memory corruption Jarkko Nikula
2011-12-12 10:23 ` Igor Grinberg
2011-12-12 11:22 ` Jarkko Nikula
2011-12-12 11:57 ` Igor Grinberg
2011-12-12 18:33 ` Tony Lindgren
2011-12-14 20:50 ` Ramirez Luna, Omar
2011-12-14 21:54 ` 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).