]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
coresight: checking for NULL string in coresight_name_match()
authorMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 17 Dec 2015 15:47:02 +0000 (08:47 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 1 Feb 2016 17:22:21 +0000 (12:22 -0500)
commitdc25a0a0d2bc9296d0d66cbe7a17f698122d3c41
tree308b10fc3e3cc2f4ca47a86e33c2e2585379daad
parent5de8e1eed3221cb8737c2617c4567b70833795e6
coresight: checking for NULL string in coresight_name_match()

[ Upstream commit fadf3a44e974b030e7145218ad1ab25e3ef91738 ]

Connection child names associated to ports can sometimes be NULL,
which is the case when booting a system on QEMU or when the Coresight
power domain isn't switched on.

This patch is adding a check to make sure a NULL string isn't fed
to strcmp(), something that avoid crashing the system.

Cc: <stable@vger.kernel.org> # v3.18+
Reported-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/hwtracing/coresight/coresight.c