From: shamir rabinovitch Date: Thu, 7 Apr 2016 11:57:35 +0000 (-0400) Subject: RDS: memory allocated must be align to 8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e98499ac63977c75331b198a18979944a532c9f2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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; }