Patchwork [net-next,2/4] caif: Bad assert triggering false positive.

login
register
mail settings
Submitter sjur.brandeland@stericsson.com
Date Dec. 6, 2011, 12:48 p.m.
Message ID <1323175740-1952-2-git-send-email-sjur.brandeland@stericsson.com>
Download mbox | patch
Permalink /patch/129671/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

sjur.brandeland@stericsson.com - Dec. 6, 2011, 12:48 p.m.
Fix bad assert on fragment size triggering false positive.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
 net/caif/cfrfml.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c
index 81660f8..6dc75d4 100644
--- a/net/caif/cfrfml.c
+++ b/net/caif/cfrfml.c
@@ -190,7 +190,7 @@  out:
 
 static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt)
 {
-	caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size);
+	caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size + RFM_HEAD_SIZE);
 
 	/* Add info for MUX-layer to route the packet out. */
 	cfpkt_info(pkt)->channel_id = rfml->serv.layer.id;