All of lore.kernel.org
 help / color / mirror / Atom feed
From: santosh shilimkar <santosh.shilimkar@oracle.com>
To: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>,
	rds-devel@oss.oracle.com, netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH v4 1/2] RDS: memory allocated must be align to 8
Date: Fri, 8 Apr 2016 12:44:39 -0700	[thread overview]
Message-ID: <57080A27.8050509@oracle.com> (raw)
In-Reply-To: <1460030256-16791-1-git-send-email-shamir.rabinovitch@oracle.com>

On 4/7/2016 4:57 AM, Shamir Rabinovitch wrote:
> Fix issue in 'rds_ib_cong_recv' when accessing unaligned memory
> allocated by 'rds_page_remainder_alloc' using uint64_t pointer.
>
Sorry I still didn't follow this change still. What exactly is the
problem.

> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
> ---
>   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 616f21f..e2b5a58 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;
>   			}
>

  parent reply	other threads:[~2016-04-08 19:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 11:57 [PATCH v4 1/2] RDS: memory allocated must be align to 8 Shamir Rabinovitch
2016-04-07 11:57 ` [PATCH v4 2/2] RDS: fix congestion map corruption for PAGE_SIZE > 4k Shamir Rabinovitch
2016-04-08 19:39   ` santosh shilimkar
2016-04-08 19:44 ` santosh shilimkar [this message]
2016-04-08 20:10   ` [PATCH v4 1/2] RDS: memory allocated must be align to 8 David Miller
2016-04-08 20:55     ` santosh shilimkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57080A27.8050509@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=shamir.rabinovitch@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.