diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-10-04 17:41:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:34 -0400 |
commit | 7d9e8931f93683e575679e41f188d3b465269f08 (patch) | |
tree | 6ce6b1c15dae53beedf3330d1500a44be86f842d /net/dccp/ccids | |
parent | cd1f7d347c9e51f348119811bd41b74346ec57b8 (diff) |
[CCID2]: Remove ugly BUG_ON
This removes an ugly BUG_ON which has been pointed out by Arnaldo.
Instead of freezing up the machine, a `critical' message is now issued
to the system log.
There is potential of doing this more gracefully (eg. there are a few
internal variables which could be updated despite the lack of memory),
but that requires more complicated changes to the algorithm; thus a
`FIXME' has been added.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 5c6b4f97a664..3e4fa6b6f251 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -294,12 +294,11 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
294 | next = hctx->ccid2hctx_seqh->ccid2s_next; | 294 | next = hctx->ccid2hctx_seqh->ccid2s_next; |
295 | /* check if we need to alloc more space */ | 295 | /* check if we need to alloc more space */ |
296 | if (next == hctx->ccid2hctx_seqt) { | 296 | if (next == hctx->ccid2hctx_seqt) { |
297 | int rc; | 297 | if (ccid2_hc_tx_alloc_seq(hctx)) { |
298 | 298 | DCCP_CRIT("packet history - out of memory!"); | |
299 | ccid2_pr_debug("allocating more space in history\n"); | 299 | /* FIXME: find a more graceful way to bail out */ |
300 | rc = ccid2_hc_tx_alloc_seq(hctx); | 300 | return; |
301 | BUG_ON(rc); /* XXX what do we do? */ | 301 | } |
302 | |||
303 | next = hctx->ccid2hctx_seqh->ccid2s_next; | 302 | next = hctx->ccid2hctx_seqh->ccid2s_next; |
304 | BUG_ON(next == hctx->ccid2hctx_seqt); | 303 | BUG_ON(next == hctx->ccid2hctx_seqt); |
305 | } | 304 | } |