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
8b2ed4bb
Commit
8b2ed4bb
authored
Nov 21, 2006
by
Arnaldo Carvalho de Melo
Committed by
David S. Miller
Dec 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPVS]: Use kmemdup where appropriate
Signed-off-by:
Arnaldo Carvalho de Melo
<
acme@mandriva.com
>
parent
e6b61105
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
net/ipv4/ipvs/ip_vs_app.c
net/ipv4/ipvs/ip_vs_app.c
+1
-2
net/ipv4/ipvs/ip_vs_proto.c
net/ipv4/ipvs/ip_vs_proto.c
+1
-7
No files found.
net/ipv4/ipvs/ip_vs_app.c
View file @
8b2ed4bb
...
@@ -80,10 +80,9 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
...
@@ -80,10 +80,9 @@ ip_vs_app_inc_new(struct ip_vs_app *app, __u16 proto, __u16 port)
if
(
!
pp
->
unregister_app
)
if
(
!
pp
->
unregister_app
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
inc
=
km
alloc
(
sizeof
(
struct
ip_vs_app
),
GFP_KERNEL
);
inc
=
km
emdup
(
app
,
sizeof
(
*
inc
),
GFP_KERNEL
);
if
(
!
inc
)
if
(
!
inc
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memcpy
(
inc
,
app
,
sizeof
(
*
inc
));
INIT_LIST_HEAD
(
&
inc
->
p_list
);
INIT_LIST_HEAD
(
&
inc
->
p_list
);
INIT_LIST_HEAD
(
&
inc
->
incs_list
);
INIT_LIST_HEAD
(
&
inc
->
incs_list
);
inc
->
app
=
app
;
inc
->
app
=
app
;
...
...
net/ipv4/ipvs/ip_vs_proto.c
View file @
8b2ed4bb
...
@@ -118,13 +118,7 @@ void ip_vs_protocol_timeout_change(int flags)
...
@@ -118,13 +118,7 @@ void ip_vs_protocol_timeout_change(int flags)
int
*
int
*
ip_vs_create_timeout_table
(
int
*
table
,
int
size
)
ip_vs_create_timeout_table
(
int
*
table
,
int
size
)
{
{
int
*
t
;
return
kmemdup
(
table
,
size
,
GFP_ATOMIC
);
t
=
kmalloc
(
size
,
GFP_ATOMIC
);
if
(
t
==
NULL
)
return
NULL
;
memcpy
(
t
,
table
,
size
);
return
t
;
}
}
...
...
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