diff options
author | shamir rabinovitch <shamir.rabinovitch@oracle.com> | 2016-04-07 13:57:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-07 22:58:27 +0200 |
commit | e98499ac63977c75331b198a18979944a532c9f2 (patch) | |
tree | 209abde5dccbc9e0670334555c75f09464fa8b31 /net/rds/page.c | |
parent | GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU (diff) | |
download | linux-e98499ac63977c75331b198a18979944a532c9f2.tar.xz linux-e98499ac63977c75331b198a18979944a532c9f2.zip |
RDS: memory allocated must be align to 8
Fix issue in 'rds_ib_cong_recv' when accessing unaligned memory
allocated by 'rds_page_remainder_alloc' using uint64_t pointer.
Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/page.c')
-rw-r--r-- | net/rds/page.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/page.c b/net/rds/page.c index 616f21f4e7d7..e2b5a5832d3d 100644 --- a/net/rds/page.c +++ b/net/rds/page.c @@ -135,8 +135,8 @@ int rds_page_remainder_alloc(struct scatterlist *scat, unsigned long bytes, if (rem->r_offset != 0) rds_stats_inc(s_page_remainder_hit); - rem->r_offset += bytes; - if (rem->r_offset == PAGE_SIZE) { + rem->r_offset += ALIGN(bytes, 8); + if (rem->r_offset >= PAGE_SIZE) { __free_page(rem->r_page); rem->r_page = NULL; } |