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
120c95b9
Commit
120c95b9
authored
Sep 02, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Do not BUG() on icmp_xmit_lock() contention, just drop.
parent
21a86619
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
net/ipv4/icmp.c
net/ipv4/icmp.c
+13
-5
No files found.
net/ipv4/icmp.c
View file @
120c95b9
...
@@ -230,12 +230,18 @@ static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
...
@@ -230,12 +230,18 @@ static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
static
DEFINE_PER_CPU
(
struct
socket
*
,
__icmp_socket
)
=
NULL
;
static
DEFINE_PER_CPU
(
struct
socket
*
,
__icmp_socket
)
=
NULL
;
#define icmp_socket __get_cpu_var(__icmp_socket)
#define icmp_socket __get_cpu_var(__icmp_socket)
static
__inline__
void
icmp_xmit_lock
(
void
)
static
__inline__
int
icmp_xmit_lock
(
void
)
{
{
local_bh_disable
();
local_bh_disable
();
if
(
unlikely
(
!
spin_trylock
(
&
icmp_socket
->
sk
->
sk_lock
.
slock
)))
if
(
unlikely
(
!
spin_trylock
(
&
icmp_socket
->
sk
->
sk_lock
.
slock
)))
{
BUG
();
/* This can happen if the output path signals a
* dst_link_failure() for an outgoing ICMP packet.
*/
local_bh_enable
();
return
1
;
}
return
0
;
}
}
static
void
icmp_xmit_unlock
(
void
)
static
void
icmp_xmit_unlock
(
void
)
...
@@ -376,7 +382,8 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
...
@@ -376,7 +382,8 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
if
(
ip_options_echo
(
&
icmp_param
->
replyopts
,
skb
))
if
(
ip_options_echo
(
&
icmp_param
->
replyopts
,
skb
))
goto
out
;
goto
out
;
icmp_xmit_lock
();
if
(
icmp_xmit_lock
())
return
;
icmp_param
->
data
.
icmph
.
checksum
=
0
;
icmp_param
->
data
.
icmph
.
checksum
=
0
;
icmp_out_count
(
icmp_param
->
data
.
icmph
.
type
);
icmp_out_count
(
icmp_param
->
data
.
icmph
.
type
);
...
@@ -488,7 +495,8 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
...
@@ -488,7 +495,8 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
}
}
}
}
icmp_xmit_lock
();
if
(
icmp_xmit_lock
())
return
;
/*
/*
* Construct source address and options.
* Construct source address and options.
...
...
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