From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 10/18] drm/rockchip: Don't grab dev->struct_mutex for in mmap offset ioctl Date: Mon, 10 Aug 2015 12:58:31 +0200 Message-ID: <20150810105830.GK1262@ulmo.nvidia.com> References: <1436477570-4936-1-git-send-email-daniel.vetter@ffwll.ch> <1436477570-4936-11-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1991031761==" Return-path: In-Reply-To: <1436477570-4936-11-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Daniel Vetter , Intel Graphics Development , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============1991031761== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EVcIhgQsEzAXu06J" Content-Disposition: inline --EVcIhgQsEzAXu06J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 09, 2015 at 11:32:42PM +0200, Daniel Vetter wrote: > Since David Herrmann's mmap vma manager rework we don't need to grab > dev->struct_mutex any more to prevent races when looking up the mmap > offset. Drop it and instead don't forget to use the unref_unlocked > variant (since the drm core still cares). >=20 > Aside: I stumbled over the mmap handler which directly does a > dma_mmap_attrs. But totally fails to grab a reference on the > underlying object and hence looks like it happily just leaks the ptes > since there's no guarantee the mmap isn't still around when > gem_free_object is called. Which the kerneldoc of dma_mmap_attrs > explicitly forbids. Same is true for Exynos, which seems to be the source for copy/paste here. Anyway, for this change: Reviewed-by: Thierry Reding --EVcIhgQsEzAXu06J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVyIPVAAoJEN0jrNd/PrOhG1gP/i0pwzD41sGkxbruIq9Yaka5 me51qovmMFRIylf02pRqZ8kvE8ozDIdXGoRopohmFNOguDJJGgdogyFIqqjfjIXm HUGGNyzEveSRAJnCO5WJe5MnUyKf9F6kvmgkXKr5jTgpxV9iVbsO6qXvA1UODSk2 befYS3ptwTlfgVYFiJAXMNvtBtYwPgWOpK51pHM20xTFir6C4gbeyPM8mUHlT+T3 SFr0UNw7qpwVAF0O73irSwliaev5QwWVA0NL8OV6M4PIW3fewoHHISLZNo0j9swv gJoliInemWOwD5+YFbcjSCJ06dOvhNKtoZLQr0/d/ba9jN8BA/oZcIMAIa8ra9mr /iqAWyNQhio1Wlclvsl7bL6nHZh36i3J01cW7ky47BcGDtSKU7ErNxx66874s50q CnG4iPe7FqEQQXmXbOI/cdkPt9BkJy2/v87s4o4Z5h2P226wnaijIc7YW2dVSEjU o0fQ0OXL+++4SmdA4JzJJJyGE2CpbkvycC2jx2D/Uvv+VlIphY8FHXgWCtob0mgs eSqU8GDqgWI12iF7VF4AtAZlFmSLOYewxE/mSZh26nXL3IPA13GTYDfh5BI9wDQi 3GW12/iiGAw9JiuZ6QuOouHS9L2ilJz3H33GUqFjn5+8TFoqJrO8fD40/pLC5z/B O2BLOrXFxraMi9SsQZxK =ZfAw -----END PGP SIGNATURE----- --EVcIhgQsEzAXu06J-- --===============1991031761== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============1991031761==--