NXP/FSL SoC driver updates for v5.1 take3

DPIO driver
 - fixed a use after free problem
 - fixed a memory leak on error path
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEhb3UXAyxp6UQ0v6khtxQDvusFVQFAlxsbpsACgkQhtxQDvus
 FVTLjBAAtoB2WjG6f8QPPsUi+qsnxW3WoIyZoVvhy+epc9yfhvnXTH5d63sWdlZU
 ZfCtDwtRSaeac/uTq7ph1aqz4N5o/XS0/oLsvAKfKOlc3acTszMlF/oQe9nHpEZB
 dStyU0ZYmJD2DIQYQc1565FaN4Zik4dKZvj78hK2uR8mzHD+MlphV0aXG1MXFWgA
 1VuGCQ8BXF6AiGd24wGqEjXHFSZngpcf9Wa7qU12BtUB0VEL7vrkHaabsLpVdcmN
 oOp3P8O0EJzew1cSxwfXOd+X8usXFvUC6WDTUHB7yraJlpC5AteDURdhldOiueEp
 9Qi+f46txjvFklA/L+Ji2gagR4bxy55XNaWZcppmuLPRD1GmisTM/9oAL3UO6cDB
 uadMZCkw/QpBMVH8Ng/rXqNpy3r8tVc6/xZIt+hFHkizpXmqpGSwpNWAsRH9aM8m
 5XV1CxHIied0WiK54ZIdcHbxE5R06Eq6jaB2VlZlnusPwuFmh+GolNlvj87QBvkZ
 J6dMIJE9/xCfoyp5p1KfYJ713IAAfeSpeoks134dkhDApYRZlDoRNyJBQaBQCMRc
 YImTFw1sECCfH2UsQgDXKAHQm0KSFotFKodM/YOeeQpjXTJxDMTQrfMjiMhcsgn5
 BZLXivkHpPfcGKAYVV6l026Vib5m1Ton39DN3KcKB8wrEfjE9tw=
 =GogM
 -----END PGP SIGNATURE-----

Merge tag 'soc-fsl-next-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.1 take3

DPIO driver
- fixed a use after free problem
- fixed a memory leak on error path

* tag 'soc-fsl-next-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: dpio: fix memory leak of a struct qbman on error exit path
  soc: fsl: dpio: Use after free in dpaa2_dpio_remove()

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2019-02-20 16:12:49 +01:00
commit 3b96fe66c7
2 changed files with 2 additions and 1 deletions

View File

@ -220,12 +220,12 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)
dev = &dpio_dev->dev;
priv = dev_get_drvdata(dev);
cpu = dpaa2_io_get_cpu(priv->io);
dpaa2_io_down(priv->io);
dpio_teardown_irqs(dpio_dev);
cpu = dpaa2_io_get_cpu(priv->io);
cpumask_set_cpu(cpu, cpus_unused_mask);
err = dpio_open(dpio_dev->mc_io, 0, dpio_dev->obj_desc.id,

View File

@ -180,6 +180,7 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d)
reg = qbman_read_register(p, QBMAN_CINH_SWP_CFG);
if (!reg) {
pr_err("qbman: the portal is not enabled!\n");
kfree(p);
return NULL;
}