Skip to content
Commit f06c06de authored by Jackson Cooper-Driver's avatar Jackson Cooper-Driver Committed by Carles Cufí
Browse files

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: default avatarJackson Cooper-Driver <jackson.cooper---driver@amd.com>
parent 4a318444
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment