diff --git a/qos_auth/auth_ctl/qos_ctrl.c b/qos_auth/auth_ctl/qos_ctrl.c index 2304edf9b911ce788cc1e5ba5a35bca25c7a263c..73bc107f1d698b6b7f8ac7a39a85fe0251f259b6 100644 --- a/qos_auth/auth_ctl/qos_ctrl.c +++ b/qos_auth/auth_ctl/qos_ctrl.c @@ -256,6 +256,12 @@ int qos_apply(struct qos_ctrl_data *data) qts = (struct qos_task_struct *) &p->qts; + if (rt_task(p) && qts->in_qos == NO_QOS) { + pr_err("[QOS_CTRL] can not apply qos for native rt task\n"); + ret = -ALREADY_RT_TASK; + goto out_unlock; + } + /* effective qos must in range [NO_QOS, NR_QOS) */ if (qts->in_qos != NO_QOS) { if (qts->in_qos == level) { diff --git a/qos_auth/include/auth_ctrl.h b/qos_auth/include/auth_ctrl.h index f2e04ee959666450efe3eece4a1e547df9c29178..7301cacc2d126c5e9723af698e6ffd0fed00e4b3 100644 --- a/qos_auth/include/auth_ctrl.h +++ b/qos_auth/include/auth_ctrl.h @@ -72,6 +72,7 @@ enum auth_err_no { PID_DUPLICATE, PID_NOT_EXIST, INVALID_AUTH, + ALREADY_RT_TASK, QOS_THREAD_NUM_EXCEED_LIMIT, };