diff options
author | shamir rabinovitch <shamir.rabinovitch@oracle.com> | 2016-04-07 13:57:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-07 22:58:28 +0200 |
commit | 579ba855524c49d30929871b63c1f7637ffab4b6 (patch) | |
tree | fbae7fb56f3e62fa189fc3a5cbc835c558fe4589 /net/rds/ib_recv.c | |
parent | RDS: memory allocated must be align to 8 (diff) | |
download | linux-579ba855524c49d30929871b63c1f7637ffab4b6.tar.xz linux-579ba855524c49d30929871b63c1f7637ffab4b6.zip |
RDS: fix congestion map corruption for PAGE_SIZE > 4k
When PAGE_SIZE > 4k single page can contain 2 RDS fragments. If
'rds_ib_cong_recv' ignore the RDS fragment offset in to the page it
then read the data fragment as far congestion map update and lead to
corruption of the RDS connection far congestion map.
Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/ib_recv.c')
-rw-r--r-- | net/rds/ib_recv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 977fb86065b7..abc8cc805e8d 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -796,7 +796,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn, addr = kmap_atomic(sg_page(&frag->f_sg)); - src = addr + frag_off; + src = addr + frag->f_sg.offset + frag_off; dst = (void *)map->m_page_addrs[map_page] + map_off; for (k = 0; k < to_copy; k += 8) { /* Record ports that became uncongested, ie |