Littel optimization on kdbus_ep_policy_check_notification().
Default bus endpoints do not enforce the endpoint policy, so instead
of checking if the endpoint is using the policy in
kdbus_ep_policy_check_see_access_unlocked(), just do the check at the
beginning and avoid all the useless locking.
This is already done for kdbus_ep_policy_check_src_names().
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
{
int ret = 0;
- if (kmsg->msg.src_id != KDBUS_SRC_ID_KERNEL)
+ if (kmsg->msg.src_id != KDBUS_SRC_ID_KERNEL || !ep->has_policy)
return 0;
switch (kmsg->notify_type) {