ieee802154: fix one possible memleak in ca8210_dev_com_init
PATCH 1/1 ieee802154: fix one possible memleak in ca8210_dev_com_init
We should call destroy_workqueue to destroy mlme_workqueue in error branch.
--- drivers/net/ieee802154/ca8210.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ieee802154/ca8210.c +1 -0
@@ -2925,6 +2925,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv) );if (!priv->irq_workqueue) {dev_crit (&priv->spi->dev,"alloc of irq_workqueue failed!\n" ); +destroy_workqueue (priv->mlme_workqueue);return -ENOMEM ; }
Signature · 1 line
2.17.1
Stefan Schmidt
maintainerHello.
Quoted 13 lines · Liu Jian
We should call
destroy_workqueueto destroymlme_workqueuein error branch.Fixes ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")Signed-off-by Liu Jian <[email protected]>--- drivers/net/ieee802154/ca8210.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ieee802154/ca8210.c +0
-0
drivers/net/ieee802154/ca8210.c static int ca8210_dev_com_init(struct ca8210_priv *priv) · line 2930
Quoted 6 lines
drivers/net/ieee802154/ca8210.c +1
-0@@ -2925,6 +2925,7 @@ static int ca8210_dev_com_init(struct ca8210_priv *priv) );if (!priv->irq_workqueue) {dev_crit (&priv->spi->dev,"alloc of irq_workqueue failed!\n" ); +destroy_workqueue (priv->mlme_workqueue);return -ENOMEM ; }
For ieee802154 patches please keep the linux-wpan list in CC. This allows me to track patches with patchwork. Applied this one manually.
This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!
regards
Stefan Schmidt
Quoted 34 lines
-----Original Message-----
From: Stefan Schmidt [mailto:[email protected]]
Sent: Tuesday, July 21, 2020 4:35 PM
To: liujian (CE) <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH net] ieee802154: fix one possible memleak inca8210_dev_com_initHello.
Quoted 1 line · Liu Jian
We should call
destroy_workqueueto destroymlme_workqueuein errorbranch.
drivers/net/ieee802154/ca8210.c static int ca8210_dev_com_init(struct ca8210_priv
Quoted 14 lines
Fixes ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 devicedriver")
Signed-off-by Liu Jian <[email protected]>--- drivers/net/ieee802154/ca8210.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/net/ieee802154/ca8210.cindexe04c3b60cae7..4eb64709d44c100644drivers/net/ieee802154/ca8210.c +0
-0@@ -2925,6 +2925,7 @@ static int ca8210_dev_com_init(struct ca8210_priv*priv)
drivers/net/ieee802154/ca8210.c static int ca8210_dev_com_init(struct ca8210_priv *priv)
Quoted 3 lines
drivers/net/ieee802154/ca8210.c +0
-0);if (!priv->irq_workqueue) { dev_crit(&priv->spi->dev, "alloc of irq_workqueue
Quoted 7 lines
failed!\n");
drivers/net/ieee802154/ca8210.c static int ca8210_dev_com_init(struct ca8210_priv *priv) · line 2930
Quoted 3 lines
drivers/net/ieee802154/ca8210.c +1
-0+destroy_workqueue (priv->mlme_workqueue);return -ENOMEM ; }For ieee802154 patches please keep the linux-wpan list in CC. This allows me to track patches with patchwork. Applied this one manually.
Got it, thank you~
Quoted 5 lines
This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks!
regards
Stefan Schmidt