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
5b703aa0
Commit
5b703aa0
authored
Aug 17, 2003
by
Herbert Xu
Committed by
David S. Miller
Aug 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Fix oops when destroying stillborn states.
parent
f7ab034d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
2 deletions
+18
-2
net/ipv4/ah4.c
net/ipv4/ah4.c
+3
-0
net/ipv4/esp4.c
net/ipv4/esp4.c
+3
-0
net/ipv4/ipcomp.c
net/ipv4/ipcomp.c
+3
-1
net/ipv6/ah6.c
net/ipv6/ah6.c
+3
-0
net/ipv6/esp6.c
net/ipv6/esp6.c
+3
-0
net/ipv6/ipcomp6.c
net/ipv6/ipcomp6.c
+3
-1
No files found.
net/ipv4/ah4.c
View file @
5b703aa0
...
...
@@ -308,6 +308,9 @@ static void ah_destroy(struct xfrm_state *x)
{
struct
ah_data
*
ahp
=
x
->
data
;
if
(
!
ahp
)
return
;
if
(
ahp
->
work_icv
)
{
kfree
(
ahp
->
work_icv
);
ahp
->
work_icv
=
NULL
;
...
...
net/ipv4/esp4.c
View file @
5b703aa0
...
...
@@ -437,6 +437,9 @@ void esp_destroy(struct xfrm_state *x)
{
struct
esp_data
*
esp
=
x
->
data
;
if
(
!
esp
)
return
;
if
(
esp
->
conf
.
tfm
)
{
crypto_free_tfm
(
esp
->
conf
.
tfm
);
esp
->
conf
.
tfm
=
NULL
;
...
...
net/ipv4/ipcomp.c
View file @
5b703aa0
...
...
@@ -336,6 +336,8 @@ static void ipcomp_free_data(struct ipcomp_data *ipcd)
static
void
ipcomp_destroy
(
struct
xfrm_state
*
x
)
{
struct
ipcomp_data
*
ipcd
=
x
->
data
;
if
(
!
ipcd
)
return
;
ipcomp_free_data
(
ipcd
);
kfree
(
ipcd
);
}
...
...
@@ -354,7 +356,6 @@ static int ipcomp_init_state(struct xfrm_state *x, void *args)
x
->
props
.
header_len
=
sizeof
(
struct
ip_comp_hdr
);
if
(
x
->
props
.
mode
)
x
->
props
.
header_len
+=
sizeof
(
struct
iphdr
);
x
->
data
=
ipcd
;
ipcd
->
scratch
=
kmalloc
(
IPCOMP_SCRATCH_SIZE
,
GFP_KERNEL
);
if
(
!
ipcd
->
scratch
)
...
...
@@ -373,6 +374,7 @@ static int ipcomp_init_state(struct xfrm_state *x, void *args)
calg_desc
=
xfrm_calg_get_byname
(
x
->
calg
->
alg_name
);
BUG_ON
(
!
calg_desc
);
ipcd
->
threshold
=
calg_desc
->
uinfo
.
comp
.
threshold
;
x
->
data
=
ipcd
;
err
=
0
;
out:
return
err
;
...
...
net/ipv6/ah6.c
View file @
5b703aa0
...
...
@@ -444,6 +444,9 @@ static void ah6_destroy(struct xfrm_state *x)
{
struct
ah_data
*
ahp
=
x
->
data
;
if
(
!
ahp
)
return
;
if
(
ahp
->
work_icv
)
{
kfree
(
ahp
->
work_icv
);
ahp
->
work_icv
=
NULL
;
...
...
net/ipv6/esp6.c
View file @
5b703aa0
...
...
@@ -342,6 +342,9 @@ void esp6_destroy(struct xfrm_state *x)
{
struct
esp_data
*
esp
=
x
->
data
;
if
(
!
esp
)
return
;
if
(
esp
->
conf
.
tfm
)
{
crypto_free_tfm
(
esp
->
conf
.
tfm
);
esp
->
conf
.
tfm
=
NULL
;
...
...
net/ipv6/ipcomp6.c
View file @
5b703aa0
...
...
@@ -268,6 +268,8 @@ static void ipcomp6_free_data(struct ipcomp_data *ipcd)
static
void
ipcomp6_destroy
(
struct
xfrm_state
*
x
)
{
struct
ipcomp_data
*
ipcd
=
x
->
data
;
if
(
!
ipcd
)
return
;
ipcomp6_free_data
(
ipcd
);
kfree
(
ipcd
);
}
...
...
@@ -286,7 +288,6 @@ static int ipcomp6_init_state(struct xfrm_state *x, void *args)
x
->
props
.
header_len
=
sizeof
(
struct
ipv6_comp_hdr
);
if
(
x
->
props
.
mode
)
x
->
props
.
header_len
+=
sizeof
(
struct
ipv6hdr
);
x
->
data
=
ipcd
;
ipcd
->
scratch
=
kmalloc
(
IPCOMP_SCRATCH_SIZE
,
GFP_KERNEL
);
if
(
!
ipcd
->
scratch
)
...
...
@@ -299,6 +300,7 @@ static int ipcomp6_init_state(struct xfrm_state *x, void *args)
calg_desc
=
xfrm_calg_get_byname
(
x
->
calg
->
alg_name
);
BUG_ON
(
!
calg_desc
);
ipcd
->
threshold
=
calg_desc
->
uinfo
.
comp
.
threshold
;
x
->
data
=
ipcd
;
err
=
0
;
out:
return
err
;
...
...
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