Message ID | 1386027699-30513-1-git-send-email-venkat.x.venkatsubra@oracle.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com> Date: Mon, 2 Dec 2013 15:41:39 -0800 > After congestion update on a local connection, when rds_ib_xmit returns > less bytes than that are there in the message, rds_send_xmit calls > back rds_ib_xmit with an offset that causes BUG_ON(off & RDS_FRAG_SIZE) > to trigger. ... > Reported-by: Josh Hunt <joshhunt00@gmail.com> > Tested-by: Honggang Li <honli@redhat.com> > Acked-by: Bang Nguyen <bang.nguyen@oracle.com> > Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com> This looks great, applied and queued up for -stable, thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index e590949..37be6e2 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -552,9 +552,8 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm, && rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) { rds_cong_map_updated(conn->c_fcong, ~(u64) 0); scat = &rm->data.op_sg[sg]; - ret = sizeof(struct rds_header) + RDS_CONG_MAP_BYTES; - ret = min_t(int, ret, scat->length - conn->c_xmit_data_off); - return ret; + ret = max_t(int, RDS_CONG_MAP_BYTES, scat->length); + return sizeof(struct rds_header) + ret; } /* FIXME we may overallocate here */