zephyr/subsys/ipc/ipc_service
Jackson Cooper-Driver f06c06de07 ipc_service: Add endpoint registered check
Currently, it is possible to call various ipc_service functions
which take in an endpoint pointer (such as send, get_tx_buffer)
with an endpoint which has not been registered with the instance.
This leads to dereferencing a NULL pointer when the function tries
to access the api field of ept->instance.
This patch adds in multiple checks to ensure that the endpoint is
registered before continuing, one in the frontend, when ensures
that the ept->instance pointer is not NULL and one in the backend
which checks the value of the token pointer. If either of these fail,
we return -ENOENT.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper---driver@amd.com>
2022-07-14 10:29:42 +02:00
..
backends ipc_service: Add endpoint registered check 2022-07-14 10:29:42 +02:00
lib lib: os: Rename icmsg_buf to spsc_pbuf 2022-06-07 19:04:35 +02:00
CMakeLists.txt ipc_service: Move libraries in a stalone directory 2021-11-12 14:51:29 +01:00
ipc_service.c ipc_service: Add endpoint registered check 2022-07-14 10:29:42 +02:00
Kconfig kconfig: Remove unneeded ${ZEPHYR_BASE} from template import 2022-03-24 18:07:28 -04:00