Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a466d7ee
Commit
a466d7ee
authored
Mar 23, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COMPAT]: Fix net/compat.c build.
parent
917fe898
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
net/compat.c
net/compat.c
+8
-8
No files found.
net/compat.c
View file @
a466d7ee
...
@@ -422,7 +422,6 @@ static int do_netfilter_replace(int fd, int level, int optname,
...
@@ -422,7 +422,6 @@ static int do_netfilter_replace(int fd, int level, int optname,
{
{
struct
compat_ipt_replace
*
urepl
=
(
struct
compat_ipt_replace
*
)
optval
;
struct
compat_ipt_replace
*
urepl
=
(
struct
compat_ipt_replace
*
)
optval
;
struct
ipt_replace
*
krepl
;
struct
ipt_replace
*
krepl
;
struct
ipt_counters
*
ucounters
;
u32
origsize
;
u32
origsize
;
unsigned
int
kreplsize
;
unsigned
int
kreplsize
;
mm_segment_t
old_fs
;
mm_segment_t
old_fs
;
...
@@ -437,8 +436,10 @@ static int do_netfilter_replace(int fd, int level, int optname,
...
@@ -437,8 +436,10 @@ static int do_netfilter_replace(int fd, int level, int optname,
if
(
optlen
!=
sizeof
(
*
urepl
)
+
origsize
)
if
(
optlen
!=
sizeof
(
*
urepl
)
+
origsize
)
return
-
ENOPROTOOPT
;
return
-
ENOPROTOOPT
;
kreplsize
=
sizeof
(
*
krepl
)
+
origsize
-
num_entries
*
/* XXX Assumes that size of ipt_entry is the same both in
(
sizeof
(
struct
compat_ipt_entry
)
-
sizeof
(
struct
ipt_entry
));
* native and compat environments.
*/
kreplsize
=
sizeof
(
*
krepl
)
+
origsize
;
krepl
=
(
struct
ipt_replace
*
)
kmalloc
(
kreplsize
,
GFP_KERNEL
);
krepl
=
(
struct
ipt_replace
*
)
kmalloc
(
kreplsize
,
GFP_KERNEL
);
if
(
krepl
==
NULL
)
if
(
krepl
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -453,7 +454,7 @@ static int do_netfilter_replace(int fd, int level, int optname,
...
@@ -453,7 +454,7 @@ static int do_netfilter_replace(int fd, int level, int optname,
__get_user
(
ucntrs
,
&
urepl
->
counters
)
||
__get_user
(
ucntrs
,
&
urepl
->
counters
)
||
__copy_from_user
(
krepl
->
entries
,
&
urepl
->
entries
,
origsize
))
__copy_from_user
(
krepl
->
entries
,
&
urepl
->
entries
,
origsize
))
goto
out_free
;
goto
out_free
;
for
(
i
=
0
;
i
<
NF_IP_NUM
_
HOOKS
;
i
++
)
{
for
(
i
=
0
;
i
<
NF_IP_NUMHOOKS
;
i
++
)
{
if
(
__get_user
(
krepl
->
hook_entry
[
i
],
&
urepl
->
hook_entry
[
i
])
||
if
(
__get_user
(
krepl
->
hook_entry
[
i
],
&
urepl
->
hook_entry
[
i
])
||
__get_user
(
krepl
->
underflow
[
i
],
&
urepl
->
underflow
[
i
]))
__get_user
(
krepl
->
underflow
[
i
],
&
urepl
->
underflow
[
i
]))
goto
out_free
;
goto
out_free
;
...
@@ -493,7 +494,6 @@ static int do_set_attach_filter(int fd, int level, int optname,
...
@@ -493,7 +494,6 @@ static int do_set_attach_filter(int fd, int level, int optname,
{
{
struct
compat_sock_fprog
*
fprog32
=
(
struct
compat_sock_fprog
*
)
optval
;
struct
compat_sock_fprog
*
fprog32
=
(
struct
compat_sock_fprog
*
)
optval
;
struct
sock_fprog
kfprog
;
struct
sock_fprog
kfprog
;
struct
sock_filter
*
kfilter
;
mm_segment_t
old_fs
;
mm_segment_t
old_fs
;
compat_uptr_t
uptr
;
compat_uptr_t
uptr
;
int
ret
;
int
ret
;
...
@@ -529,7 +529,7 @@ static int do_set_icmpv6_filter(int fd, int level, int optname,
...
@@ -529,7 +529,7 @@ static int do_set_icmpv6_filter(int fd, int level, int optname,
mm_segment_t
old_fs
;
mm_segment_t
old_fs
;
int
ret
,
i
;
int
ret
,
i
;
if
(
optlen
<
sizeof
(
*
kfilter
))
if
(
optlen
<
sizeof
(
kfilter
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
copy_from_user
(
&
kfilter
,
optval
,
sizeof
(
kfilter
)))
if
(
copy_from_user
(
&
kfilter
,
optval
,
sizeof
(
kfilter
)))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -703,13 +703,13 @@ asmlinkage long compat_sys_socketcall(int call, u32 *args)
...
@@ -703,13 +703,13 @@ asmlinkage long compat_sys_socketcall(int call, u32 *args)
ret
=
sys_send
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
]);
ret
=
sys_send
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
]);
break
;
break
;
case
SYS_SENDTO
:
case
SYS_SENDTO
:
ret
=
sys_sendto
(
a0
,
a1
,
a
[
2
],
a
[
3
],
a
[
4
]
,
a
[
5
]);
ret
=
sys_sendto
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
],
compat_ptr
(
a
[
4
])
,
a
[
5
]);
break
;
break
;
case
SYS_RECV
:
case
SYS_RECV
:
ret
=
sys_recv
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
]);
ret
=
sys_recv
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
]);
break
;
break
;
case
SYS_RECVFROM
:
case
SYS_RECVFROM
:
ret
=
sys_recvfrom
(
a0
,
a1
,
a
[
2
],
a
[
3
],
a
[
4
],
a
[
5
]
);
ret
=
sys_recvfrom
(
a0
,
compat_ptr
(
a1
),
a
[
2
],
a
[
3
],
compat_ptr
(
a
[
4
]),
compat_ptr
(
a
[
5
])
);
break
;
break
;
case
SYS_SHUTDOWN
:
case
SYS_SHUTDOWN
:
ret
=
sys_shutdown
(
a0
,
a1
);
ret
=
sys_shutdown
(
a0
,
a1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment