netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Cc: davem@davemloft.net, netdev@vger.kernel.org, marcela@dev.mellanox.co.il
Subject: Re: [PATCH net-next 1/2] mlx4_core: fix mtt range deallocation
Date: Mon, 2 Jan 2012 14:05:02 -0800	[thread overview]
Message-ID: <CAE9FiQX+LkhifWTAQLfGfPyogOKUmuWNS2cuyL5wm36hoAJS6A@mail.gmail.com> (raw)
In-Reply-To: <4F01BA2B.1060605@mellanox.co.il>

On Mon, Jan 2, 2012 at 6:07 AM, Yevgeny Petrilin
<yevgenyp@mellanox.co.il> wrote:
> From: Marcel Apfelbaum <marcela@mellanox.co.il>
>
> The mtt range was allocated in mtt units but deallocated
> in segments. Among the rest, this caused crash during hotplug removal
>
> Reported-by: Yinghai Lu <yinghai@kernel.org>
> Signed-off-by: Marcel Apfelbaum <marcela@mellanox.co.il>
> Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> ---
>  drivers/net/ethernet/mellanox/mlx4/mr.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c
> index f7243b2..01df556 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/mr.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c
> @@ -239,8 +239,8 @@ void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order)
>        first_seg = offset / (1 << log_mtts_per_seg);
>
>        mlx4_buddy_free(&mr_table->mtt_buddy, first_seg, seg_order);
> -       mlx4_table_put_range(dev, &mr_table->mtt_table, first_seg,
> -                            first_seg + (1 << seg_order) - 1);
> +       mlx4_table_put_range(dev, &mr_table->mtt_table, offset,
> +                            offset + (1 << order) - 1);
>  }
>
>  static void mlx4_free_mtt_range(struct mlx4_dev *dev, u32 offset, int order)

Tested-by: Yinghai Lu <yinghai@kernel.org>

  reply	other threads:[~2012-01-02 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 14:07 [PATCH net-next 1/2] mlx4_core: fix mtt range deallocation Yevgeny Petrilin
2012-01-02 22:05 ` Yinghai Lu [this message]
2012-01-03 18:01 ` David Miller

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=CAE9FiQX+LkhifWTAQLfGfPyogOKUmuWNS2cuyL5wm36hoAJS6A@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=davem@davemloft.net \
    --cc=marcela@dev.mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=yevgenyp@mellanox.co.il \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).