mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-26 17:16:37 -04:00
!211 merge master into master
remove qos log print to fix disable preempt problem Created-by: lingqiwei Commit-by: lingqiwei Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) https://gitcode.com/openharmony/kernel_linux_common_modules/issues/156 ### 二、建议测试周期和提测地址 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: ### 三、变更内容 * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) ### 四、研发自测点(自测哪些?冒烟用例全部自测?) 自测测试结论: ### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方) 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony/kernel_linux_common_modules!211
This commit is contained in:
@@ -532,7 +532,6 @@ bool check_authorized(unsigned int func_id, unsigned int type)
|
||||
mutex_lock(&ua_idr_mutex);
|
||||
if (!ua_idr) {
|
||||
mutex_unlock(&ua_idr_mutex);
|
||||
pr_err("[AUTH_CTRL] authority idr table missed, auth failed\n");
|
||||
return authorized;
|
||||
}
|
||||
|
||||
@@ -540,11 +539,9 @@ bool check_authorized(unsigned int func_id, unsigned int type)
|
||||
if (!auth) {
|
||||
if (uid != SUPER_UID) {
|
||||
mutex_unlock(&ua_idr_mutex);
|
||||
pr_err("[AUTH_CTRL] no auth data for this pid = %d\n, tgid");
|
||||
return authorized;
|
||||
} else if (init_super_authority(tgid)) {
|
||||
mutex_unlock(&ua_idr_mutex);
|
||||
pr_err("[AUTH_CTRL] init super authority failed\n");
|
||||
return authorized;
|
||||
}
|
||||
|
||||
@@ -560,7 +557,6 @@ bool check_authorized(unsigned int func_id, unsigned int type)
|
||||
mutex_lock(&auth->mutex);
|
||||
if (auth->status == AUTH_STATUS_DEAD) {
|
||||
mutex_unlock(&auth->mutex);
|
||||
pr_info("[AUTH_CTRL] not valid auth for pid %d\n", tgid);
|
||||
put_auth_struct(auth);
|
||||
return authorized;
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ static long ctrl_qos_operation(int abi, void __user *uarg)
|
||||
int ret = -1;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagonstic ignored "-Wpointer-to-int-cast"
|
||||
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
|
||||
|
||||
switch (abi) {
|
||||
case QOS_IOCTL_ABI_ARM32:
|
||||
@@ -712,25 +712,19 @@ long do_qos_ctrl_ioctl(int abi, struct file *file, unsigned int cmd, unsigned lo
|
||||
unsigned int func_cmd = _IOC_NR(cmd);
|
||||
|
||||
if (uarg == NULL) {
|
||||
pr_err("%s: invalid user uarg\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (_IOC_TYPE(cmd) != QOS_CTRL_IPC_MAGIG) {
|
||||
pr_err("%s: qos ctrl magic fail, TYPE=%d\n",
|
||||
__func__, _IOC_TYPE(cmd));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (func_cmd >= QOS_CTRL_MAX_NR) {
|
||||
pr_err("%s: qos ctrl cmd error, cmd:%d\n",
|
||||
__func__, _IOC_TYPE(cmd));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_QOS_AUTHORITY
|
||||
if (!check_authorized(func_cmd, QOS_AUTH_FLAG)) {
|
||||
pr_err("[QOS_CTRL] %s: pid not authorized\n", __func__);
|
||||
return -PID_NOT_AUTHORIZED;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user