Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933562AbbEOKtF (ORCPT ); Fri, 15 May 2015 06:49:05 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:36829 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753362AbbEOKtC (ORCPT ); Fri, 15 May 2015 06:49:02 -0400 Date: Fri, 15 May 2015 12:48:57 +0200 From: Thierry Reding To: Alexandre Courbot Cc: Konrad Rzeszutek Wilk , Thomas Hellstrom , Arnd Bergmann , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, gnurou@gmail.com Subject: Re: [PATCH] drm/ttm: dma: Don't crash on memory in the vmalloc range Message-ID: <20150515104856.GA28954@ulmo.nvidia.com> References: <1431673794-16169-1-git-send-email-acourbot@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <1431673794-16169-1-git-send-email-acourbot@nvidia.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2189 Lines: 56 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 15, 2015 at 04:09:54PM +0900, Alexandre Courbot wrote: > dma_alloc_coherent() can return memory in the vmalloc range. > virt_to_page() cannot handle such addresses and crashes. This > patch detects such cases and obtains the struct page * using > vmalloc_to_page() instead. >=20 > Signed-off-by: Alexandre Courbot > --- > This patch is a follow-up of the following discussion: >=20 > https://www.marc.info/?l=3Ddri-devel&m=3D141579595431254&w=3D3 >=20 > It works for me on both 32-bit and 64-bit Tegra, so I am not convinced > that Thierry's initial change from virt_to_page() to phys_to_page() is > still required - Thierry, can you confirm whether your patch is still > relevant after this one? If this works for you on both 32-bit and 64-bit Tegra I don't think the earlier patch is still relevant and this looks indeed like a much more appropriate solution. Thierry --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVVc8YAAoJEN0jrNd/PrOhH7UQALiCNiAtFhBGyLSspEDBe61P fjdo1lLFC8CgWwpxM11Zb3PDm6oQ2Fqtc4tzLPrPBlo91j9syHOVX7sgxrLOXX6M BL3fqSJjsIiN1OKXp3I8SBCM1UCjxTQ/KrQHGpEQehw0ID19pTwpX89HM+u0q32c NmKceHH8+2oeJxQKhSECf8Fz2eqJ7K4PYCONwG4mwimkeNuaKULl8CeLrBKEeMfl P9ryzHVWqOa56KPLiyMKi9Opr9X6xX6MS8XSYmlyOvZJoaSsn84L0IC5zrQP/A8M zcskdJ+8583Kp4ynZljdPexQEcP0a7qzyFu/opEcgiI39ppH2m31yXiLpV0al/qh iC6QhGabxGZSU3PTkmJU4XVRU1JpL+9TPO0ovn3dGaMPcxFwRa8lXNj2yHuBWxQ/ i5rKftPghiMHOueZSutPgv6Z1/sSypMjSTrdnw4E7ffxvdu+y9T6KhLwHK2op5jQ YUtLF77ND6AYpWMDFE1471d401qugFUJjRIgYOZmOQNNM0gEXSCLaHf2xAF2so+g s7IwKBu06wyUvK+Kk96QEfG1CnNhVz6styjvgERqeb2EnMkwg7vw1Hbng9/EcBmp bNc3aTYXexkvTuowCkRkCJQhEsf9cqLrseptHJUHWeqOAfkFjg4rTCQGYfSIUJAI PTFThOsesbTGKxrk2Gzn =KRw1 -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/