Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A54CC636CC for ; Tue, 7 Feb 2023 11:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbjBGL36 (ORCPT ); Tue, 7 Feb 2023 06:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbjBGL3z (ORCPT ); Tue, 7 Feb 2023 06:29:55 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430258A7E for ; Tue, 7 Feb 2023 03:29:54 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DFE4B34CCD; Tue, 7 Feb 2023 11:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675769392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CstnpObWbSH1VuzZOMyTwrZPwoXryoEC+928GT558WA=; b=m23qK4o8l1KemjFSGqbj0v0hWAure28dU8KoxNRsbgvOoB68lr1AVg9KAZ1IFzt2LpJ+D9 ifm8PITf33mp1WR1miTs0kTBrUvnuucYDIuDhaY3fwQltT/fJKDk1uFPTuaWmN38tCJ9kM XBTerZd9WeHpCfISpvh0HPVQhAK8E0E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675769392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CstnpObWbSH1VuzZOMyTwrZPwoXryoEC+928GT558WA=; b=VEynmn/fyhYUloqQWg4hSdpde2ILbnA1Fm6nNKMtU9oDivR0Xs5MfjF//zQeJ9VQxenJbG qDOkiQm2WSMDn9CA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AD05B139ED; Tue, 7 Feb 2023 11:29:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5UE/KTA24mM6PgAAMHmgww (envelope-from ); Tue, 07 Feb 2023 11:29:52 +0000 Message-ID: <77be28c1-52ff-87c8-b7f7-f99273d48267@suse.de> Date: Tue, 7 Feb 2023 12:29:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() Content-Language: en-US To: Asahi Lina , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , asahi@lists.linux.dev, Alyssa Rosenzweig References: <20230205125124.2260-1-lina@asahilina.net> From: Thomas Zimmermann In-Reply-To: <20230205125124.2260-1-lina@asahilina.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------rdru5Yj00h0D36L3aQGi8PxT" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------rdru5Yj00h0D36L3aQGi8PxT Content-Type: multipart/mixed; boundary="------------z0J1c34GJttYkTYx2Hf0Qi2v"; protected-headers="v1" From: Thomas Zimmermann To: Asahi Lina , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , asahi@lists.linux.dev, Alyssa Rosenzweig Message-ID: <77be28c1-52ff-87c8-b7f7-f99273d48267@suse.de> Subject: Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt() References: <20230205125124.2260-1-lina@asahilina.net> In-Reply-To: <20230205125124.2260-1-lina@asahilina.net> --------------z0J1c34GJttYkTYx2Hf0Qi2v Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGkNCg0KQW0gMDUuMDIuMjMgdW0gMTM6NTEgc2NocmllYiBBc2FoaSBMaW5hOg0KPiBPdGhl ciBmdW5jdGlvbnMgdG91Y2hpbmcgc2htZW0tPnNndCB0YWtlIHRoZSBwYWdlcyBsb2NrLCBz byBkbyB0aGF0IGhlcmUNCg0KUmVhbGx5PyBJIHdhcyBqdXN0IGxvY2tpbmcgYXQgdGhlIExp bWEgZHJpdmVyIGFuZCBpdCBhcHBhcmVudGx5IGFjY2VzcyANCnNndCB3aXRob3V0IGxvY2tp bmcgaW4gWzFdLiBOb3QgdGhhdCBJIGRpc2FncmVlIHdpdGggdGhlIHBhdGNoIGluIGdlbmVy YWwuDQoNCkJlc3QgcmVnYXJkcw0KVGhvbWFzDQoNClsxXSANCmh0dHBzOi8vZWxpeGlyLmJv b3RsaW4uY29tL2xpbnV4L2xhdGVzdC9zb3VyY2UvZHJpdmVycy9ncHUvZHJtL2xpbWEvbGlt YV9nZW0uYyNMMjENCg0KPiB0b28uIGRybV9nZW1fc2htZW1fZ2V0X3BhZ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2Hf0Qi2v-- --------------rdru5Yj00h0D36L3aQGi8PxT Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEExndm/fpuMUdwYFFolh/E3EQov+AFAmPiNjAFAwAAAAAACgkQlh/E3EQov+AY qxAAzKurG9MXQXR5nLjC0RAKxoLyINYmrQOU++KMXUZj7SeUi0HRs5AmtPddf6DWOp06FvKDtlSS 7m4vvMPrJXujERWuQgc9zvlAW3Nd9DbNpbCYrkYNFvaUlIgcD527swu5cv61J107c8lY1p5c6Ny/ PDvZIvp6IPVcLN4O82eiF7V43jwkCoAIsk3vIIy7+bTStERH1vPYFrcLsBkRt3M7XjStDzyY41cM aA/A+0d1YNfd7LLnxdcFN5zOdCNK1v3pHOCvjZNE1QFzA3nWqV6sRHx+6R8Gv8/yawjoaq6l59R5 /KsBbdZYwfh26dknN9SXEpHDX9T42Z32BL6knE7pcI4jQGRLaSv2VaBpzsH3OrujeZuNZvRxvhVu XPqrpZinbNanpQJMmIoOTXpo40OpaEvmyaZ6W0c+qpJ0ScDxFSXqbRKH80YO+aC5FxXzaK9bgEYJ Bb4AUXRMncj+AmYnGPSrZtXPs2RG+9nFAHtu1kxr7VBs9ofe7IF2T/y06GnSnjXgHlu+0+rXzBgi s2/GWXoc89pXva/hfBbbpZIL/J11XK3XVMFN4sEj54fF4kPmoIa4WQLChcHMmyTZ89PsfgQCHSqV JDgr6RRtal8GUyDCStGgwi/mSgulO3yfhFdDYpkJTEbBjHXiT2iAcMrKC4ojhOh+QTKFmTtOjO3y QDQ= =Ab7O -----END PGP SIGNATURE----- --------------rdru5Yj00h0D36L3aQGi8PxT--