lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] PCI: rcar-gen2: Fix crash in resource_list_first_type()
On Tue, Aug 4, 2020 at 6:04 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> The conversion to modern host bridge probing made the driver allocate
> its private data using devm_pci_alloc_host_bridge(), but forgot to
> remove the old allocation. Hence part of the driver initialization is
> done using the new instance, while another part is done using the old
> instance, leading to a crash due to uninitialized bridge DMA ranges:
>
> Unable to handle kernel NULL pointer dereference at virtual address 00000008
> pgd = (ptrval)
> [00000008] *pgd=00000000
> Internal error: Oops: 5 [#1] SMP ARM
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc1-shmobile-00035-g92d69cc6275845a7 #645
> Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
> PC is at rcar_pci_probe+0x154/0x340
> LR is at _raw_spin_unlock_irqrestore+0x18/0x20
>
> Fix this by dropping the old allocation.
>
> Fixes: 92d69cc6275845a7 ("PCI: rcar-gen2: Convert to use modern host bridge probe functions")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/pci/controller/pci-rcar-gen2.c | 4 ----
> 1 file changed, 4 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

\
 
 \ /
  Last update: 2020-08-04 17:17    [W:0.046 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site