[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN3PR0701MB1719B826CB12B1C6FD9E00989AD60@BN3PR0701MB1719.namprd07.prod.outlook.com>
Date: Thu, 30 Apr 2015 00:07:05 +0000
From: "Daney, David" <David.Daney@...iumnetworks.com>
To: Ido Shamay <idos@....mellanox.co.il>,
David Daney <ddaney.cavm@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
CC: Roland Dreier <roland@...nel.org>,
Sean Hefty <sean.hefty@...el.com>,
"Hal Rosenstock" <hal.rosenstock@...il.com>,
Amir Vadai <amirv@...lanox.com>,
"Or Gerlitz" <ogerlitz@...lanox.com>,
Yishai Hadas <yishaih@...lanox.com>,
"Matan Barak" <matanb@...lanox.com>,
Majd Dibbiny <majd@...lanox.com>,
"Jack Morgenstein" <jackm@....mellanox.co.il>,
Moni Shoua <monis@...lanox.com>,
Eugenia Emantayev <eugenia@...lanox.co.il>,
Saeed Mahameed <saeedm@...lanox.com>,
Yuval Atias <yuvala@...lanox.com>,
Maor Gottlieb <maorg@...lanox.com>,
David Daney <david.daney@...ium.com>
Subject: RE: [PATCH RFC] net/mlx4: Remove improper usage of
dma_alloc_coherent().
First of all, let me apologize for top posting, but it is currently my only option.
I have been away from my office for the last couple of weeks, I was going to re-send on Monday, May 4. If you would like to do it before then, please go ahead and do that.
Thanks,
David Daney
-----Original Message-----
From: Ido Shamay [mailto:idos@....mellanox.co.il]
Sent: Wednesday, April 29, 2015 7:14 AM
To: David Daney; linux-kernel@...r.kernel.org; netdev@...r.kernel.org; linux-rdma@...r.kernel.org; David S. Miller
Cc: Roland Dreier; Sean Hefty; Hal Rosenstock; Amir Vadai; Or Gerlitz; Yishai Hadas; Matan Barak; Majd Dibbiny; Jack Morgenstein; Moni Shoua; Eugenia Emantayev; Saeed Mahameed; Yuval Atias; Maor Gottlieb; David Daney
Subject: Re: [PATCH RFC] net/mlx4: Remove improper usage of dma_alloc_coherent().
On 4/13/2015 12:33 AM, Ido Shamay wrote:
> On 4/7/2015 10:43 PM, Ido Shamay wrote:
>> On 4/7/2015 2:00 AM, David Daney wrote:
>>> From: David Daney <david.daney@...ium.com>
>>>
>>> The dma_alloc_coherent() function returns a virtual address which
>>> can be used for coherent access to the underlying memory. On some
>>> architectures, like arm64, undefined behavior results if this memory
>>> is also accessed via virtual mappings that are not coherent. Because
>>> of their undefined nature, operations like virt_to_page() return
>>> garbage when passed virtual addresses obtained from
>>> dma_alloc_coherent(). Any subsequent mappings via vmap() of the
>>> garbage page values are unusable and result in bad things like bus
>>> errors (synchronous aborts in ARM64 speak).
>>>
>>> The MLX4 driver contains code that does the equivalent of:
>>>
>>> vmap(virt_to_page(dma_alloc_coherent))
>>>
>>> This results in an OOPs when the device is opened.
>>>
>>> To fix this...
>>>
>>> Always use result of dma_alloc_coherent() directly.
> Acked-by: Ido Shamay <idos@...lanox.com> Thanks David, this is good
> for us
Hi David,
Are you resending this patch or you want us to do that?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists