[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190107.071032.1121771113620094413.davem@davemloft.net>
Date: Mon, 07 Jan 2019 07:10:32 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: swarren@...dotorg.org
Cc: tariqt@...lanox.com, xavier.huwei@...wei.com,
netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
dledford@...hat.com, jgg@...lanox.com, hch@....de,
swarren@...dia.com
Subject: Re: [PATCH v4 1/2] net/mlx4: Get rid of page operation after
dma_alloc_coherent
From: Stephen Warren <swarren@...dotorg.org>
Date: Thu, 3 Jan 2019 10:23:23 -0700
> From: Stephen Warren <swarren@...dia.com>
>
> This patch solves a crash at the time of mlx4 driver unload or system
> shutdown. The crash occurs because dma_alloc_coherent() returns one
> value in mlx4_alloc_icm_coherent(), but a different value is passed to
> dma_free_coherent() in mlx4_free_icm_coherent(). In turn this is because
> when allocated, that pointer is passed to sg_set_buf() to record it,
> then when freed it is re-calculated by calling
> lowmem_page_address(sg_page()) which returns a different value. Solve
> this by recording the value that dma_alloc_coherent() returns, and
> passing this to dma_free_coherent().
>
> This patch is roughly equivalent to commit 378efe798ecf ("RDMA/hns: Get
> rid of page operation after dma_alloc_coherent").
>
> Based-on-code-from: Christoph Hellwig <hch@....de>
> Signed-off-by: Stephen Warren <swarren@...dia.com>
Applied.
Powered by blists - more mailing lists