aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/proto.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-07-26 00:43:18 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-26 00:43:18 -0400
commit547b792cac0a038b9dbf958d3c120df3740b5572 (patch)
tree08554d083b0ca7d65739dc1ce12f9b12a9b8e1f8 /net/dccp/proto.c
parent53e5e96ec18da6f65e89f05674711e1c93d8df67 (diff)
net: convert BUG_TRAP to generic WARN_ON
Removes legacy reinvent-the-wheel type thing. The generic machinery integrates much better to automated debugging aids such as kerneloops.org (and others), and is unambiguous due to better naming. Non-intuively BUG_TRAP() is actually equal to WARN_ON() rather than BUG_ON() though some might actually be promoted to BUG_ON() but I left that to future. I could make at least one BUILD_BUG_ON conversion. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r--net/dccp/proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index a0b56009611f..b622d9744856 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -327,7 +327,7 @@ int dccp_disconnect(struct sock *sk, int flags)
327 inet_csk_delack_init(sk); 327 inet_csk_delack_init(sk);
328 __sk_dst_reset(sk); 328 __sk_dst_reset(sk);
329 329
330 BUG_TRAP(!inet->num || icsk->icsk_bind_hash); 330 WARN_ON(inet->num && !icsk->icsk_bind_hash);
331 331
332 sk->sk_error_report(sk); 332 sk->sk_error_report(sk);
333 return err; 333 return err;
@@ -981,7 +981,7 @@ adjudge_to_death:
981 */ 981 */
982 local_bh_disable(); 982 local_bh_disable();
983 bh_lock_sock(sk); 983 bh_lock_sock(sk);
984 BUG_TRAP(!sock_owned_by_user(sk)); 984 WARN_ON(sock_owned_by_user(sk));
985 985
986 /* Have we already been destroyed by a softirq or backlog? */ 986 /* Have we already been destroyed by a softirq or backlog? */
987 if (state != DCCP_CLOSED && sk->sk_state == DCCP_CLOSED) 987 if (state != DCCP_CLOSED && sk->sk_state == DCCP_CLOSED)