All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc4xx_edac: Fix kernel oops
@ 2015-07-21  9:00 Michael Walle
  2015-07-21  9:47 ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Walle @ 2015-07-21  9:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Michael Walle, Doug Thompson, Mauro Carvalho Chehab, linux-edac

The commit de3910eb79ac8c0f29a11224661c0ebaaf813039 changed the memory
allocation for the csrows member. But ppc4xx_edac was forgotten in the
patch. Fix it.

This is warning reported by the compiler:

drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_init_csrows':
drivers/edac/ppc4xx_edac.c:924:28: warning: initialization from
incompatible pointer type [enabled by default]
   struct csrow_info *csi = &mci->csrows[row];

Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-edac@vger.kernel.org
Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/edac/ppc4xx_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index 0f04d5e..4c1991d 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -921,7 +921,7 @@ static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
 	 */
 
 	for (row = 0; row < mci->nr_csrows; row++) {
-		struct csrow_info *csi = &mci->csrows[row];
+		struct csrow_info *csi = mci->csrows[row];
 
 		/*
 		 * Get the configuration settings for this
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppc4xx_edac: Fix kernel oops
  2015-07-21  9:00 [PATCH] ppc4xx_edac: Fix kernel oops Michael Walle
@ 2015-07-21  9:47 ` Borislav Petkov
  2015-07-21  9:55   ` Michael Walle
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2015-07-21  9:47 UTC (permalink / raw)
  To: Michael Walle
  Cc: linux-kernel, Doug Thompson, Mauro Carvalho Chehab, linux-edac

On Tue, Jul 21, 2015 at 11:00:53AM +0200, Michael Walle wrote:
> The commit de3910eb79ac8c0f29a11224661c0ebaaf813039 changed the memory
> allocation for the csrows member. But ppc4xx_edac was forgotten in the
> patch. Fix it.
> 
> This is warning reported by the compiler:
> 
> drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_init_csrows':
> drivers/edac/ppc4xx_edac.c:924:28: warning: initialization from
> incompatible pointer type [enabled by default]
>    struct csrow_info *csi = &mci->csrows[row];
> 
> Cc: Doug Thompson <dougthompson@xmission.com>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-edac@vger.kernel.org
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  drivers/edac/ppc4xx_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
> index 0f04d5e..4c1991d 100644
> --- a/drivers/edac/ppc4xx_edac.c
> +++ b/drivers/edac/ppc4xx_edac.c
> @@ -921,7 +921,7 @@ static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
>  	 */
>  
>  	for (row = 0; row < mci->nr_csrows; row++) {
> -		struct csrow_info *csi = &mci->csrows[row];
> +		struct csrow_info *csi = mci->csrows[row];
>  
>  		/*
>  		 * Get the configuration settings for this

Applied, thanks.

Your $Subject says "Fix kernel oops" - do we need to mark this one for
stable? It fixing a real bug and all...

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppc4xx_edac: Fix kernel oops
  2015-07-21  9:47 ` Borislav Petkov
@ 2015-07-21  9:55   ` Michael Walle
  2015-07-21 10:07     ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Walle @ 2015-07-21  9:55 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: linux-kernel, Doug Thompson, Mauro Carvalho Chehab, linux-edac

Am 2015-07-21 11:47, schrieb Borislav Petkov:
> On Tue, Jul 21, 2015 at 11:00:53AM +0200, Michael Walle wrote:
>> The commit de3910eb79ac8c0f29a11224661c0ebaaf813039 changed the memory
>> allocation for the csrows member. But ppc4xx_edac was forgotten in the
>> patch. Fix it.
>> 
>> This is warning reported by the compiler:
>> 
>> drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_init_csrows':
>> drivers/edac/ppc4xx_edac.c:924:28: warning: initialization from
>> incompatible pointer type [enabled by default]
>>    struct csrow_info *csi = &mci->csrows[row];
>> 
>> Cc: Doug Thompson <dougthompson@xmission.com>
>> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
>> Cc: linux-edac@vger.kernel.org
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> ---
>>  drivers/edac/ppc4xx_edac.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
>> index 0f04d5e..4c1991d 100644
>> --- a/drivers/edac/ppc4xx_edac.c
>> +++ b/drivers/edac/ppc4xx_edac.c
>> @@ -921,7 +921,7 @@ static int ppc4xx_edac_init_csrows(struct 
>> mem_ctl_info *mci, u32 mcopt1)
>>  	 */
>> 
>>  	for (row = 0; row < mci->nr_csrows; row++) {
>> -		struct csrow_info *csi = &mci->csrows[row];
>> +		struct csrow_info *csi = mci->csrows[row];
>> 
>>  		/*
>>  		 * Get the configuration settings for this
> 
> Applied, thanks.
> 
> Your $Subject says "Fix kernel oops" - do we need to mark this one for
> stable? It fixing a real bug and all...

Yes it is a real bug, see below:

Unable to handle kernel paging request for data at address 0x26efd108
Faulting instruction address: 0xc038a7a8
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT PowerPC 40x Platform
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.17-yocto-standard #10
task: df02ec00 ti: df040000 task.ti: df040000
NIP: c038a7a8 LR: c038a794 CTR: c0335840
REGS: df041c80 TRAP: 0300   Not tainted  (3.10.17-yocto-standard)
MSR: 00029030 <EE,ME,IR,DR>  CR: 22000084  XER: 20000000
DEAR: 26efd108, ESR: 00800000

GPR00: 00000001 df041d30 df02ec00 000000c1 00000001 00000000 c0336b50 
000000b0
GPR08: c05c06a4 00000000 00020000 26efd000 22000024 00000000 00000004 
df280000
GPR16: c054ab2c 00008000 0000a000 0000b000 00009000 00000001 00000003 
df040000
GPR24: c05e0000 df26ff60 df07ba00 c054a8c0 c054a8c8 00000005 0000000b 
00000000
NIP [c038a7a8] ppc4xx_edac_probe+0x528/0x760
LR [c038a794] ppc4xx_edac_probe+0x514/0x760
Call Trace:
[df041d30] [c038a794] ppc4xx_edac_probe+0x514/0x760 (unreliable)
[df041db0] [c03473f8] really_probe+0x78/0x270
[df041dd0] [c0347768] __driver_attach+0xc8/0xd0
[df041df0] [c0345158] bus_for_each_dev+0x68/0xc0
[df041e20] [c03469b8] bus_add_driver+0x208/0x2c0
[df041e40] [c0347f78] driver_register+0x88/0x1d0
[df041e60] [c0002688] do_one_initcall+0x158/0x1c0
[df041e90] [c05828bc] kernel_init_freeable+0x120/0x1f4
[df041f20] [c0002ca4] kernel_init+0x14/0x170
[df041f40] [c000d054] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
7f26cb78 7ea8ab78 3ab50001 81670008 7d695b78 91610030 48108f8d 813900f4
8141002c 80010034 81610030 7d2a4b96 <900b0108> 93cb0110 92cb010c 
93ab0114
---[ end trace 84652655114fec1e ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppc4xx_edac: Fix kernel oops
  2015-07-21  9:55   ` Michael Walle
@ 2015-07-21 10:07     ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2015-07-21 10:07 UTC (permalink / raw)
  To: Michael Walle
  Cc: linux-kernel, Doug Thompson, Mauro Carvalho Chehab, linux-edac

On Tue, Jul 21, 2015 at 11:55:21AM +0200, Michael Walle wrote:
> Yes it is a real bug, see below:

Ok, tagged for stable@.

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-21 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-21  9:00 [PATCH] ppc4xx_edac: Fix kernel oops Michael Walle
2015-07-21  9:47 ` Borislav Petkov
2015-07-21  9:55   ` Michael Walle
2015-07-21 10:07     ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.