Skip to content

Commit

Permalink
RDS: fix congestion map corruption for PAGE_SIZE > 4k
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
srabinov authored and davem330 committed Apr 7, 2016
1 parent e98499a commit 579ba85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rds/ib_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 579ba85

Please sign in to comment.