Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3551900rwl; Sun, 2 Apr 2023 09:51:02 -0700 (PDT) X-Google-Smtp-Source: AKy350bJqPGB2GYowwMRS42Et8HbC66h1qFLNahnfw24T28Q2N/L3hZuNpE7lP+5kAFaYgO6q5vx X-Received: by 2002:a05:6402:1e90:b0:4bf:b2b1:84d8 with SMTP id f16-20020a0564021e9000b004bfb2b184d8mr15319502edf.19.1680454261818; Sun, 02 Apr 2023 09:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680454261; cv=none; d=google.com; s=arc-20160816; b=BsQpbJGxNmRBKhX0zda05EVCSG379lxHiJC6q1o5jWoYPdX7JmQetYJ52LYViUQR1V wPOHVBdWajL41ZH5wkxCKLQnNXHWOhH41IqBYPBgNCkmhbU5o+Qfs8Atq5Lre8ZDtUlI W9OdBxKtqd3bhsibNzVXuB7ZQZOL1usgnq5kEraHqUWLKdXwsrYP+EO8//MXpY0ELCCW guhor5TQErDiO7TI7cUz1j0oNhHREs6L9oKGvGZk1uVJVoxha60p/DLGHPoQW8f6KYdk ZTicw+HmwKMGYZ7AvO7T9FaFXCXdws4nSEiip0W5YRi8+VHutxkO+0erssbHNuvyzFhh DQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1bZ3EoPNFjYSwMAVhX9pub1vIFkIXyMpgoTLW96mpGw=; b=Moyrmb2DMfVSmMt+xP/zOneYVVIvbqJa74/0/TWN6c5Kx23iTp6QCAtaxIqthGOznx wiTwnmlWAfltK4g68vUWW4JUlKh4uoPCBYBN1t5tnc91tF9FdYjfNta3XWSXDF2cwsnp c5eqCwXzQcg4AT1NjYmW8fbu1sw90yO0oLBpGw01N2QjnqLh5HTYaubqP7UVHf8032vY ycmVGeiyQdES3KYp8Ux7Bp76tepA4v9oCbG5F1DGTTFrV5R4T6hKIS/qRU6LmCsJfO7O QYNvLdeILWYAAO4ohi/IiAvkwZ4iEPyp39JTsuT46Lc0+sGhRLd3KDIxydWUnUWvblNY ohow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hP3BTt5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a50ed0a000000b004fbbd7bee7csi5995732eds.58.2023.04.02.09.50.37; Sun, 02 Apr 2023 09:51:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=hP3BTt5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbjDBQtb (ORCPT + 99 others); Sun, 2 Apr 2023 12:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbjDBQt0 (ORCPT ); Sun, 2 Apr 2023 12:49:26 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A37EEC5F; Sun, 2 Apr 2023 09:49:23 -0700 (PDT) Received: from workpc.. (109-252-124-32.nat.spd-mgts.ru [109.252.124.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id C97F16603149; Sun, 2 Apr 2023 17:49:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680454162; bh=eVCdRV5qU8vynb/wrbVZGCbVBKV3Y+cRuke8yPhNiSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hP3BTt5MkgWeSKeeRJnyPJdkJiCW4vh+CO/RD3NLk4Z71S6FposyyUQvkf+9iAEvm ViYtSop9tvAbEeer3NCbYe/ksUYBAaDKPI3yk3PY0jdHSlWullovFmAkAfywGn72+0 2OtqCX755RxvHKTzm25LdjO5bt5nv8+gWe29xcH+PpxoxeOnqihfOjDkPwGXBE5BXL 1lqsBdysM0KsO7CnNJwE2ewR/DFm45y2iNyqIP0Cb8x8BRonPuUZ5zplmcGUhKu5v1 y05NU/gTqSAzoeyRYtqoewGziWoxECJQKdv7R6MP1tZ7uftHxjroX9+JHenoswzVCr 7I8ScLsqJwgbw== From: Dmitry Osipenko To: Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Benjamin Gaignard , Liam Mark , Brian Starkey , John Stultz , Gerd Hoffmann , Daniel Vetter , Jani Nikula , Arnd Bergmann , Greg Kroah-Hartman , Thomas Zimmermann , Tomi Valkeinen , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Srinivas Kandagatla , Amol Maheshwari Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel@collabora.com Subject: [PATCH v1 4/7] Revert "fastrpc: Assert held reservation lock for dma-buf mmapping" Date: Sun, 2 Apr 2023 19:48:23 +0300 Message-Id: <20230402164826.752842-5-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230402164826.752842-1-dmitry.osipenko@collabora.com> References: <20230402164826.752842-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't assert held dma-buf reservation lock on memory mapping of exported buffer. We're going to change dma-buf mmap() locking policy such that exporters will have to handle the lock. The previous locking policy caused deadlock problem for DRM drivers in a case of self-imported dma-bufs, it's solved by moving the lock down to exporters. Fixes: 265751a513ad ("fastrpc: Assert held reservation lock for dma-buf mmapping") Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index a701132638cf..7e9c9ad37fd9 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -733,8 +732,6 @@ static int fastrpc_mmap(struct dma_buf *dmabuf, struct fastrpc_buf *buf = dmabuf->priv; size_t size = vma->vm_end - vma->vm_start; - dma_resv_assert_held(dmabuf->resv); - return dma_mmap_coherent(buf->dev, vma, buf->virt, FASTRPC_PHYS(buf->phys), size); } -- 2.39.2