Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
e1fb19cb
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 2 年 前同步成功
通知
173
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e1fb19cb
编写于
3月 14, 2016
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'device-properties'
* device-properties: device property: fix for a case of use-after-free
上级
bdeabccd
0d67e0fa
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
8 deletion
+17
-8
drivers/base/property.c
drivers/base/property.c
+17
-8
未找到文件。
drivers/base/property.c
浏览文件 @
e1fb19cb
...
@@ -218,7 +218,8 @@ bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname)
...
@@ -218,7 +218,8 @@ bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname)
bool
ret
;
bool
ret
;
ret
=
__fwnode_property_present
(
fwnode
,
propname
);
ret
=
__fwnode_property_present
(
fwnode
,
propname
);
if
(
ret
==
false
&&
fwnode
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
if
(
ret
==
false
&&
!
IS_ERR_OR_NULL
(
fwnode
)
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
ret
=
__fwnode_property_present
(
fwnode
->
secondary
,
propname
);
ret
=
__fwnode_property_present
(
fwnode
->
secondary
,
propname
);
return
ret
;
return
ret
;
}
}
...
@@ -423,7 +424,8 @@ EXPORT_SYMBOL_GPL(device_property_match_string);
...
@@ -423,7 +424,8 @@ EXPORT_SYMBOL_GPL(device_property_match_string);
int _ret_; \
int _ret_; \
_ret_ = FWNODE_PROP_READ(_fwnode_, _propname_, _type_, _proptype_, \
_ret_ = FWNODE_PROP_READ(_fwnode_, _propname_, _type_, _proptype_, \
_val_, _nval_); \
_val_, _nval_); \
if (_ret_ == -EINVAL && _fwnode_ && !IS_ERR_OR_NULL(_fwnode_->secondary)) \
if (_ret_ == -EINVAL && !IS_ERR_OR_NULL(_fwnode_) && \
!IS_ERR_OR_NULL(_fwnode_->secondary)) \
_ret_ = FWNODE_PROP_READ(_fwnode_->secondary, _propname_, _type_, \
_ret_ = FWNODE_PROP_READ(_fwnode_->secondary, _propname_, _type_, \
_proptype_, _val_, _nval_); \
_proptype_, _val_, _nval_); \
_ret_; \
_ret_; \
...
@@ -593,7 +595,8 @@ int fwnode_property_read_string_array(struct fwnode_handle *fwnode,
...
@@ -593,7 +595,8 @@ int fwnode_property_read_string_array(struct fwnode_handle *fwnode,
int
ret
;
int
ret
;
ret
=
__fwnode_property_read_string_array
(
fwnode
,
propname
,
val
,
nval
);
ret
=
__fwnode_property_read_string_array
(
fwnode
,
propname
,
val
,
nval
);
if
(
ret
==
-
EINVAL
&&
fwnode
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
if
(
ret
==
-
EINVAL
&&
!
IS_ERR_OR_NULL
(
fwnode
)
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
ret
=
__fwnode_property_read_string_array
(
fwnode
->
secondary
,
ret
=
__fwnode_property_read_string_array
(
fwnode
->
secondary
,
propname
,
val
,
nval
);
propname
,
val
,
nval
);
return
ret
;
return
ret
;
...
@@ -621,7 +624,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
...
@@ -621,7 +624,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
int
ret
;
int
ret
;
ret
=
__fwnode_property_read_string
(
fwnode
,
propname
,
val
);
ret
=
__fwnode_property_read_string
(
fwnode
,
propname
,
val
);
if
(
ret
==
-
EINVAL
&&
fwnode
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
if
(
ret
==
-
EINVAL
&&
!
IS_ERR_OR_NULL
(
fwnode
)
&&
!
IS_ERR_OR_NULL
(
fwnode
->
secondary
))
ret
=
__fwnode_property_read_string
(
fwnode
->
secondary
,
ret
=
__fwnode_property_read_string
(
fwnode
->
secondary
,
propname
,
val
);
propname
,
val
);
return
ret
;
return
ret
;
...
@@ -820,11 +824,16 @@ void device_remove_property_set(struct device *dev)
...
@@ -820,11 +824,16 @@ void device_remove_property_set(struct device *dev)
* the pset. If there is no real firmware node (ACPI/DT) primary
* the pset. If there is no real firmware node (ACPI/DT) primary
* will hold the pset.
* will hold the pset.
*/
*/
if
(
!
is_pset_node
(
fwnode
))
if
(
is_pset_node
(
fwnode
))
{
fwnode
=
fwnode
->
secondary
;
set_primary_fwnode
(
dev
,
NULL
);
if
(
!
IS_ERR
(
fwnode
)
&&
is_pset_node
(
fwnode
))
pset_free_set
(
to_pset_node
(
fwnode
));
pset_free_set
(
to_pset_node
(
fwnode
));
}
else
{
fwnode
=
fwnode
->
secondary
;
if
(
!
IS_ERR
(
fwnode
)
&&
is_pset_node
(
fwnode
))
{
set_secondary_fwnode
(
dev
,
NULL
);
set_secondary_fwnode
(
dev
,
NULL
);
pset_free_set
(
to_pset_node
(
fwnode
));
}
}
}
}
EXPORT_SYMBOL_GPL
(
device_remove_property_set
);
EXPORT_SYMBOL_GPL
(
device_remove_property_set
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录