projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfeffd1
)
soc: fsl: dpio: cleanup the cpu array on dpaa2_io_down
author
Ioana Ciornei
<ioana.ciornei@nxp.com>
Tue, 4 Dec 2018 11:20:27 +0000
(11:20 +0000)
committer
Li Yang
<leoyang.li@nxp.com>
Tue, 8 Jan 2019 20:15:36 +0000
(14:15 -0600)
The dpio_by_cpu array should not contain a reference to a freed dpaa2_io
object. This patch adds the necessary cleanup in dpaa2_io_down.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/dpio/dpio-service.c
patch
|
blob
|
history
diff --git
a/drivers/soc/fsl/dpio/dpio-service.c
b/drivers/soc/fsl/dpio/dpio-service.c
index ec0837ff039a0a334d11df97bde68d6316bbaaee..ab046f241d3265e0310d0714f3b6b2b10b3283f5 100644
(file)
--- a/
drivers/soc/fsl/dpio/dpio-service.c
+++ b/
drivers/soc/fsl/dpio/dpio-service.c
@@
-160,6
+160,11
@@
struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc)
*/
void dpaa2_io_down(struct dpaa2_io *d)
{
+ spin_lock(&dpio_list_lock);
+ dpio_by_cpu[d->dpio_desc.cpu] = NULL;
+ list_del(&d->node);
+ spin_unlock(&dpio_list_lock);
+
kfree(d);
}