Commit 7d9e8931 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd1f7d34
...@@ -294,12 +294,11 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) ...@@ -294,12 +294,11 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
next = hctx->ccid2hctx_seqh->ccid2s_next; next = hctx->ccid2hctx_seqh->ccid2s_next;
/* check if we need to alloc more space */ /* check if we need to alloc more space */
if (next == hctx->ccid2hctx_seqt) { if (next == hctx->ccid2hctx_seqt) {
int rc; if (ccid2_hc_tx_alloc_seq(hctx)) {
DCCP_CRIT("packet history - out of memory!");
ccid2_pr_debug("allocating more space in history\n"); /* FIXME: find a more graceful way to bail out */
rc = ccid2_hc_tx_alloc_seq(hctx); return;
BUG_ON(rc); /* XXX what do we do? */ }
next = hctx->ccid2hctx_seqh->ccid2s_next; next = hctx->ccid2hctx_seqh->ccid2s_next;
BUG_ON(next == hctx->ccid2hctx_seqt); BUG_ON(next == hctx->ccid2hctx_seqt);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment