Unverified Commit fa7c6902 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15324 Fix Fix CVE-2022-49351

Merge Pull Request from: @ci-robot 
 
PR sync from: Hongbo Li <lihongbo22@huawei.com>
https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/CQ54PTAPEEG2LMRWZDYNVWIA2FKLGVMK/ 
Fix Fix CVE-2022-49351.

Miaoqian Lin (1):
  net: altera: Fix refcount leak in altera_tse_mdio_create

 
https://gitee.com/src-openeuler/kernel/issues/IBPBZ0 
 
Link:https://gitee.com/openeuler/kernel/pulls/15324

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Reviewed-by: default avatarYuan Can <yuancan@huawei.com>
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
parents b612591c aa914e9d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -174,7 +174,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
	mdio = mdiobus_alloc();
	if (mdio == NULL) {
		netdev_err(dev, "Error allocating MDIO bus\n");
		return -ENOMEM;
		ret = -ENOMEM;
		goto put_node;
	}

	mdio->name = ALTERA_TSE_RESOURCE_NAME;
@@ -191,6 +192,7 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
			   mdio->id);
		goto out_free_mdio;
	}
	of_node_put(mdio_node);

	if (netif_msg_drv(priv))
		netdev_info(dev, "MDIO bus %s: created\n", mdio->id);
@@ -200,6 +202,8 @@ static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)
out_free_mdio:
	mdiobus_free(mdio);
	mdio = NULL;
put_node:
	of_node_put(mdio_node);
	return ret;
}