]> git.baikalelectronics.ru Git - arm-tf.git/commit
lib: cpus: sanity check pointers before use
authorVarun Wadekar <vwadekar@nvidia.com>
Tue, 1 Oct 2019 16:34:10 +0000 (09:34 -0700)
committerManish Pandey <manish.pandey2@arm.com>
Mon, 24 Aug 2020 21:26:48 +0000 (21:26 +0000)
commit601e3ed209eb508c9e46a5ef18a562613338dcc8
treec21b6a41d8e414068c5b6a7297bc14929cec57a7
parent64b2a237aaf06a472506d70fe9ccf809f8ac1b49
lib: cpus: sanity check pointers before use

The cpu_ops structure contains a lot of function pointers. It
is a good idea to verify that the function pointer is not NULL
before executing it.

This patch sanity checks each pointer before use to prevent any
unforeseen crashes. These checks have been enabled for debug
builds only.

Change-Id: Ib208331c20e60f0c7c582a20eb3d8cc40fb99d21
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
lib/cpus/aarch64/cpu_helpers.S