From: David Miller <davem@davemloft.net>
To: honli@redhat.com
Cc: eli@mellanox.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next v2] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures
Date: Tue, 14 Apr 2015 14:05:46 -0400 (EDT) [thread overview]
Message-ID: <20150414.140546.1390992213156919928.davem@davemloft.net> (raw)
In-Reply-To: <1428916918-24404-1-git-send-email-honli@redhat.com>
From: Honggang Li <honli@redhat.com>
Date: Mon, 13 Apr 2015 17:21:58 +0800
> If CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for x86 systems and physical
> memory is more than 4GB, dma_map_page may return a valid memory
> address which greater than 0xffffffff. As a result, the mlx5 device page
> allocator RB tree will be initialized with valid addresses greater than
> 0xfffffff.
>
> However, (addr & PAGE_MASK) set the high four bytes to zeros. So, it's
> impossible for the function, free_4k, to release the pages whose
> addresses greater than 4GB. Memory leaks. And mlx5_ib module can't
> release the pages when user try to remove the module, as a result,
> system hang.
>
> [root@rdma05 root]# dmesg | grep addr | head
> addr = 3fe384000
> addr & PAGE_MASK = fe384000
> [root@rdma05 root]# rmmod mlx5_ib <---- hang on
>
> ---------------------- cosnole log -----------------
> mlx5_ib 0000:04:00.0: irq 138 for MSI/MSI-X
> alloc irq_desc for 139 on node -1
> alloc kstat_irqs on node -1
> mlx5_ib 0000:04:00.0: irq 139 for MSI/MSI-X
> 0000:04:00.0:free_4k:221:(pid 1519): page not found
> 0000:04:00.0:free_4k:221:(pid 1519): page not found
> 0000:04:00.0:free_4k:221:(pid 1519): page not found
> 0000:04:00.0:free_4k:221:(pid 1519): page not found
> ---------------------- cosnole log -----------------
>
> Signed-off-by: Honggang Li <honli@redhat.com>
Please someone at Mellanox review this.
next prev parent reply other threads:[~2015-04-14 18:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 9:21 [PATCH linux-next v2] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures Honggang Li
2015-04-14 18:05 ` David Miller [this message]
[not found] ` <1428916918-24404-1-git-send-email-honli-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-04-14 19:23 ` Eli Cohen
2015-04-15 3:12 ` Honggang LI
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=20150414.140546.1390992213156919928.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eli@mellanox.com \
--cc=honli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).