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
037d5e9d
Commit
037d5e9d
authored
May 08, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFRM]: Fix typos in xfrm_state_put() changes.
parent
a4e17696
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
include/net/xfrm.h
include/net/xfrm.h
+1
-1
net/xfrm/xfrm_state.c
net/xfrm/xfrm_state.c
+11
-11
No files found.
include/net/xfrm.h
View file @
037d5e9d
...
@@ -336,7 +336,7 @@ extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2];
...
@@ -336,7 +336,7 @@ extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX*2];
static
inline
void
xfrm_pol_hold
(
struct
xfrm_policy
*
policy
)
static
inline
void
xfrm_pol_hold
(
struct
xfrm_policy
*
policy
)
{
{
if
(
likely
(
policy
))
if
(
likely
(
policy
!=
NULL
))
atomic_inc
(
&
policy
->
refcnt
);
atomic_inc
(
&
policy
->
refcnt
);
}
}
...
...
net/xfrm/xfrm_state.c
View file @
037d5e9d
...
@@ -144,7 +144,7 @@ static void xfrm_timer_handler(unsigned long data)
...
@@ -144,7 +144,7 @@ static void xfrm_timer_handler(unsigned long data)
resched:
resched:
if
(
next
!=
LONG_MAX
&&
if
(
next
!=
LONG_MAX
&&
!
mod_timer
(
&
x
->
timer
,
jiffies
+
make_jiffies
(
next
)))
!
mod_timer
(
&
x
->
timer
,
jiffies
+
make_jiffies
(
next
)))
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
goto
out
;
goto
out
;
expired:
expired:
...
@@ -249,7 +249,7 @@ void xfrm_state_flush(u8 proto)
...
@@ -249,7 +249,7 @@ void xfrm_state_flush(u8 proto)
restart:
restart:
list_for_each_entry
(
x
,
xfrm_state_bydst
+
i
,
bydst
)
{
list_for_each_entry
(
x
,
xfrm_state_bydst
+
i
,
bydst
)
{
if
(
proto
==
IPSEC_PROTO_ANY
||
x
->
id
.
proto
==
proto
)
{
if
(
proto
==
IPSEC_PROTO_ANY
||
x
->
id
.
proto
==
proto
)
{
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
spin_unlock_bh
(
&
xfrm_state_lock
);
spin_unlock_bh
(
&
xfrm_state_lock
);
xfrm_state_delete
(
x
);
xfrm_state_delete
(
x
);
...
@@ -344,14 +344,14 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
...
@@ -344,14 +344,14 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
if
(
km_query
(
x
,
tmpl
,
pol
)
==
0
)
{
if
(
km_query
(
x
,
tmpl
,
pol
)
==
0
)
{
x
->
km
.
state
=
XFRM_STATE_ACQ
;
x
->
km
.
state
=
XFRM_STATE_ACQ
;
list_add_tail
(
&
x
->
bydst
,
xfrm_state_bydst
+
h
);
list_add_tail
(
&
x
->
bydst
,
xfrm_state_bydst
+
h
);
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
if
(
x
->
id
.
spi
)
{
if
(
x
->
id
.
spi
)
{
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
family
);
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
family
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
}
}
x
->
lft
.
hard_add_expires_seconds
=
XFRM_ACQ_EXPIRES
;
x
->
lft
.
hard_add_expires_seconds
=
XFRM_ACQ_EXPIRES
;
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
mod_timer
(
&
x
->
timer
,
XFRM_ACQ_EXPIRES
*
HZ
);
mod_timer
(
&
x
->
timer
,
XFRM_ACQ_EXPIRES
*
HZ
);
}
else
{
}
else
{
x
->
km
.
state
=
XFRM_STATE_DEAD
;
x
->
km
.
state
=
XFRM_STATE_DEAD
;
...
@@ -373,15 +373,15 @@ void xfrm_state_insert(struct xfrm_state *x)
...
@@ -373,15 +373,15 @@ void xfrm_state_insert(struct xfrm_state *x)
spin_lock_bh
(
&
xfrm_state_lock
);
spin_lock_bh
(
&
xfrm_state_lock
);
list_add
(
&
x
->
bydst
,
xfrm_state_bydst
+
h
);
list_add
(
&
x
->
bydst
,
xfrm_state_bydst
+
h
);
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
x
->
props
.
family
);
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
x
->
props
.
family
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
if
(
!
mod_timer
(
&
x
->
timer
,
jiffies
+
HZ
))
if
(
!
mod_timer
(
&
x
->
timer
,
jiffies
+
HZ
))
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
spin_unlock_bh
(
&
xfrm_state_lock
);
spin_unlock_bh
(
&
xfrm_state_lock
);
wake_up
(
&
km_waitq
);
wake_up
(
&
km_waitq
);
...
@@ -399,7 +399,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
...
@@ -399,7 +399,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
x
->
curlft
.
packets
>=
x
->
lft
.
hard_packet_limit
)
{
x
->
curlft
.
packets
>=
x
->
lft
.
hard_packet_limit
)
{
km_expired
(
x
);
km_expired
(
x
);
if
(
!
mod_timer
(
&
x
->
timer
,
jiffies
+
XFRM_ACQ_EXPIRES
*
HZ
))
if
(
!
mod_timer
(
&
x
->
timer
,
jiffies
+
XFRM_ACQ_EXPIRES
*
HZ
))
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -466,7 +466,7 @@ struct xfrm_state * xfrm_find_acq_byseq(u32 seq)
...
@@ -466,7 +466,7 @@ struct xfrm_state * xfrm_find_acq_byseq(u32 seq)
for
(
i
=
0
;
i
<
XFRM_DST_HSIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
XFRM_DST_HSIZE
;
i
++
)
{
list_for_each_entry
(
x
,
xfrm_state_bydst
+
i
,
bydst
)
{
list_for_each_entry
(
x
,
xfrm_state_bydst
+
i
,
bydst
)
{
if
(
x
->
km
.
seq
==
seq
)
{
if
(
x
->
km
.
seq
==
seq
)
{
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
spin_unlock_bh
(
&
xfrm_state_lock
);
spin_unlock_bh
(
&
xfrm_state_lock
);
return
x
;
return
x
;
}
}
...
@@ -521,7 +521,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi)
...
@@ -521,7 +521,7 @@ xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi)
spin_lock_bh
(
&
xfrm_state_lock
);
spin_lock_bh
(
&
xfrm_state_lock
);
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
x
->
props
.
family
);
h
=
xfrm_spi_hash
(
&
x
->
id
.
daddr
,
x
->
id
.
spi
,
x
->
id
.
proto
,
x
->
props
.
family
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
list_add
(
&
x
->
byspi
,
xfrm_state_byspi
+
h
);
xfrm_state_hold
(
x
)
xfrm_state_hold
(
x
)
;
spin_unlock_bh
(
&
xfrm_state_lock
);
spin_unlock_bh
(
&
xfrm_state_lock
);
wake_up
(
&
km_waitq
);
wake_up
(
&
km_waitq
);
}
}
...
...
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