]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mdesc: fix a missing-check bug in get_vdev_port_node_info()
authorGen Zhang <blackgod016574@gmail.com>
Fri, 31 May 2019 01:24:18 +0000 (09:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:34:50 +0000 (11:34 +0800)
commit910282a17f7329bf0d6c5027f1951bc19452b164
treea69adebbacc2c56e976fae9092393eac727c8e14
parentd3c0d72279e1576e404a7e7b92b2bdb668bc0c59
mdesc: fix a missing-check bug in get_vdev_port_node_info()

[ Upstream commit 80caf43549e7e41a695c6d1e11066286538b336f ]

In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated
by kstrdup_const(), and it returns NULL when fails. So
'node_info->vdev_port.name' should be checked.

Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/sparc/kernel/mdesc.c