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
Kirill Smelkov
linux
Commits
af997d8c
Commit
af997d8c
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
[SCTP]: Use kzalloc where appropriate
Signed-off-by:
Arnaldo Carvalho de Melo
<
acme@mandriva.com
>
parent
c7b1b249
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
net/sctp/sm_make_chunk.c
net/sctp/sm_make_chunk.c
+5
-8
No files found.
net/sctp/sm_make_chunk.c
View file @
af997d8c
...
...
@@ -1279,15 +1279,13 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
-
(
bodysize
%
SCTP_COOKIE_MULTIPLE
);
*
cookie_len
=
headersize
+
bodysize
;
retval
=
kmalloc
(
*
cookie_len
,
GFP_ATOMIC
);
if
(
!
retval
)
goto
nodata
;
/* Clear this memory since we are sending this data structure
* out on the network.
*/
memset
(
retval
,
0x00
,
*
cookie_len
);
retval
=
kzalloc
(
*
cookie_len
,
GFP_ATOMIC
);
if
(
!
retval
)
goto
nodata
;
cookie
=
(
struct
sctp_signed_cookie
*
)
retval
->
body
;
/* Set up the parameter header. */
...
...
@@ -1910,10 +1908,9 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
/* Copy cookie in case we need to resend COOKIE-ECHO. */
cookie
=
asoc
->
peer
.
cookie
;
if
(
cookie
)
{
asoc
->
peer
.
cookie
=
km
alloc
(
asoc
->
peer
.
cookie_len
,
gfp
);
asoc
->
peer
.
cookie
=
km
emdup
(
cookie
,
asoc
->
peer
.
cookie_len
,
gfp
);
if
(
!
asoc
->
peer
.
cookie
)
goto
clean_up
;
memcpy
(
asoc
->
peer
.
cookie
,
cookie
,
asoc
->
peer
.
cookie_len
);
}
/* RFC 2960 7.2.1 The initial value of ssthresh MAY be arbitrarily
...
...
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