Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b1b0c245
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
b1b0c245
编写于
10月 01, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lift handling of SIOCIW... out of dev_ioctl()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
4cf808e7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
25 deletion
+12
-25
include/net/wext.h
include/net/wext.h
+2
-2
net/core/dev_ioctl.c
net/core/dev_ioctl.c
+0
-18
net/socket.c
net/socket.c
+1
-1
net/wireless/wext-core.c
net/wireless/wext-core.c
+9
-4
未找到文件。
include/net/wext.h
浏览文件 @
b1b0c245
...
...
@@ -7,7 +7,7 @@
struct
net
;
#ifdef CONFIG_WEXT_CORE
int
wext_handle_ioctl
(
struct
net
*
net
,
struct
iwreq
*
iwr
,
unsigned
int
cmd
,
int
wext_handle_ioctl
(
struct
net
*
net
,
unsigned
int
cmd
,
void
__user
*
arg
);
int
compat_wext_handle_ioctl
(
struct
net
*
net
,
unsigned
int
cmd
,
unsigned
long
arg
);
...
...
@@ -15,7 +15,7 @@ int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
struct
iw_statistics
*
get_wireless_stats
(
struct
net_device
*
dev
);
int
call_commit_handler
(
struct
net_device
*
dev
);
#else
static
inline
int
wext_handle_ioctl
(
struct
net
*
net
,
struct
iwreq
*
iwr
,
unsigned
int
cmd
,
static
inline
int
wext_handle_ioctl
(
struct
net
*
net
,
unsigned
int
cmd
,
void
__user
*
arg
)
{
return
-
EINVAL
;
...
...
net/core/dev_ioctl.c
浏览文件 @
b1b0c245
...
...
@@ -411,24 +411,6 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg)
if
(
cmd
==
SIOCGIFNAME
)
return
dev_ifname
(
net
,
(
struct
ifreq
__user
*
)
arg
);
/*
* Take care of Wireless Extensions. Unfortunately struct iwreq
* isn't a proper subset of struct ifreq (it's 8 byte shorter)
* so we need to treat it specially, otherwise applications may
* fault if the struct they're passing happens to land at the
* end of a mapped page.
*/
if
(
cmd
>=
SIOCIWFIRST
&&
cmd
<=
SIOCIWLAST
)
{
struct
iwreq
iwr
;
if
(
copy_from_user
(
&
iwr
,
arg
,
sizeof
(
iwr
)))
return
-
EFAULT
;
iwr
.
ifr_name
[
sizeof
(
iwr
.
ifr_name
)
-
1
]
=
0
;
return
wext_handle_ioctl
(
net
,
&
iwr
,
cmd
,
arg
);
}
if
(
copy_from_user
(
&
ifr
,
arg
,
sizeof
(
struct
ifreq
)))
return
-
EFAULT
;
...
...
net/socket.c
浏览文件 @
b1b0c245
...
...
@@ -1005,7 +1005,7 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
}
else
#ifdef CONFIG_WEXT_CORE
if
(
cmd
>=
SIOCIWFIRST
&&
cmd
<=
SIOCIWLAST
)
{
err
=
dev
_ioctl
(
net
,
cmd
,
argp
);
err
=
wext_handle
_ioctl
(
net
,
cmd
,
argp
);
}
else
#endif
switch
(
cmd
)
{
...
...
net/wireless/wext-core.c
浏览文件 @
b1b0c245
...
...
@@ -1035,18 +1035,23 @@ static int ioctl_standard_call(struct net_device * dev,
}
int
wext_handle_ioctl
(
struct
net
*
net
,
struct
iwreq
*
iwr
,
unsigned
int
cmd
,
void
__user
*
arg
)
int
wext_handle_ioctl
(
struct
net
*
net
,
unsigned
int
cmd
,
void
__user
*
arg
)
{
struct
iw_request_info
info
=
{
.
cmd
=
cmd
,
.
flags
=
0
};
struct
iwreq
iwr
;
int
ret
;
ret
=
wext_ioctl_dispatch
(
net
,
iwr
,
cmd
,
&
info
,
if
(
copy_from_user
(
&
iwr
,
arg
,
sizeof
(
iwr
)))
return
-
EFAULT
;
iwr
.
ifr_name
[
sizeof
(
iwr
.
ifr_name
)
-
1
]
=
0
;
ret
=
wext_ioctl_dispatch
(
net
,
&
iwr
,
cmd
,
&
info
,
ioctl_standard_call
,
ioctl_private_call
);
if
(
ret
>=
0
&&
IW_IS_GET
(
cmd
)
&&
copy_to_user
(
arg
,
iwr
,
sizeof
(
struct
iwreq
)))
copy_to_user
(
arg
,
&
iwr
,
sizeof
(
struct
iwreq
)))
return
-
EFAULT
;
return
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录