On Sun, Aug 12, 2018 at 08:45:57PM +0200, Sergio Paracuellos wrote:
> @@ -561,15 +660,13 @@ static int mt7621_pci_probe(struct platform_device 
> *pdev)
>  
>       mdelay(100);
>  
> -     list_for_each_entry_safe(port, tmp, &pcie->ports, list)
> -             mt7621_pcie_enable_port(port);
> -
> -     if ((*(unsigned int *)(0xbe00000c)&0xFFFF) == 0x0101) // MT7621 E2
> -             bypass_pipe_rst(pcie);
> -     set_phy_for_ssc(pcie);
> -
>       list_for_each_entry_safe(port, tmp, &pcie->ports, list) {
>               u32 slot = port->slot;
> +
> +             mt7621_pcie_enable_port(port);
> +             if ((*(unsigned int *)(0xbe00000c)&0xFFFF) == 0x0101) // MT7621 
> E2
> +                     bypass_pipe_rst(port);
> +             set_phy_for_ssc(port);
                                ^^^^
This is a use after free.  Bugs like this are why we discourage layering
violations.

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to