Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp1953043rwj; Sun, 30 Oct 2022 08:56:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IbdONVPc1+517kLVfq7OgCPEkJVx0ADEDGi/r89RwDZ5CkZuN3VxS1mytMAlwCqP1r5lg X-Received: by 2002:a17:907:7208:b0:78e:176e:e0c6 with SMTP id dr8-20020a170907720800b0078e176ee0c6mr8801413ejc.594.1667145363667; Sun, 30 Oct 2022 08:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667145363; cv=none; d=google.com; s=arc-20160816; b=rmBfxJpaHA8Kf3TV0fOZjS9Ifl8cb93q5HCrtw1cSos/7BRvggyjnpRNHJ4iuowfbd lX4V9T0NEF1Hx2VjNlm69eu60mq3Ci48ODCr6YO8J7IGHXQSqEUf+F5sISY3VAEPMzRG IPbHqLh8IoaElGJpf9k1qow9L7EiHHXtLk48cVGah5MAK+kzFaKaJsMOSj7ggcgonvWi MkrKm3+mw4KDARH9Xu4FYzd4a0kzd3110UdiSElgz5i2LVzP63G6RUqaiDifLWYcNMVd SNehmHwDjwoKtCAlkHEW0xjb7cFuijN60aNsWyAtNbUUpiqfCIdlwu6IrnL04cZTruK9 RIdA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=v7jv2rCywjUGna1rN1nQ9+mxrEhKOP5VAjHGp3/09YU=; b=JHkMd1ASnelBbMXh5DCX3XLX9ZH6D7ZyXyAv65gKb2kMWACEuF8xGb9kdFc7N90us9 aw0RSDbH+bV38mEnMhnflXWQfYMyUaZA8Il/ldZDdmI0fyp6ggCJym4MiD6fuT0sWUjN ZEvry6qL5D+2QQt0KQo37cd02Ye3BCAi62WQcTkzWlhnwN2RaP1FBVKRU+PlzpXnWX+q w0gdzKpM7n3g2fWg1XQ6usJbFj2JljPbY+URT6hdeqdUR0+iF20X8kPM91acLy8WFuQA SEbht7rE93INs66OmCT5ZMbsp4kCEjK2aDhvQT1BNbPiKzEWQy8isMWsCo6iDWC/+TBB ttVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="KO/aESh0"; 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=NONE sp=NONE 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 y15-20020a50e60f000000b0046178c62b6asi4654458edm.477.2022.10.30.08.55.36; Sun, 30 Oct 2022 08:56:03 -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="KO/aESh0"; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbiJ3Poz (ORCPT + 99 others); Sun, 30 Oct 2022 11:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbiJ3Pox (ORCPT ); Sun, 30 Oct 2022 11:44:53 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A421314 for ; Sun, 30 Oct 2022 08:44:51 -0700 (PDT) Received: from dimapc.. (unknown [109.252.112.196]) (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 007AA6601639; Sun, 30 Oct 2022 15:44:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1667144689; bh=PBCW1pQYZlulS+wkcdlxXBG/yfECQX+mmoneFqYHeMc=; h=From:To:Cc:Subject:Date:From; b=KO/aESh02ORnQ42eMXxzJ5iTOy+T7I0QoN2WW71yk2KrvzJmauqcX+laILuetlsTq 6xGve78DarOd2CW6TbZQLpfpbB1qluBlOU5efCRwOK82ksWmf+0WM+XT5g9CqcK9b7 49uHQ/s6ghJGOXEazU7RFcCg893+Lx0OLVqgnU6PnXW1tLcMYYDBN7jecVpknpKOtU 0jZB09ZdvKnKRxWVUvHXtQw1YFkkyaFf5Sak1ob3ie8MRnm2bZmsDvkOCIO8szSH4H CbOgtXPQz7q0aUD9AgiceotOH02FnVVtwvH+i3RmaPinm7MDj6p+BXkUtPUL+KASJ0 aR1J1LciYfYSQ== From: Dmitry Osipenko To: Maarten Lankhorst , Maxime Ripard , Sumit Semwal , Thomas Zimmermann , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , noralf@tronnes.org, Dan Carpenter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Fixes for dma-buf locking issues found by Smatch Date: Sun, 30 Oct 2022 18:44:10 +0300 Message-Id: <20221030154412.8320-1-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hello, Here are the two patches fixing minor problems introduced by my "dma-buf locking convention" series. Thanks to Dan Carpenter who checked linux-next with Smatch and reported the found issues. Changelog: v2: - Added ack from Christian König to the dma-buf patch and improved the dma-buf/attachment pointer check. - Dropped v1 patch that added GEM NULL-checking to drm_gem_vunmap_unlocked() and replaced it with the NULL-checking in drm_client_buffer_delete(), like was suggested by Christian König. Dmitry Osipenko (2): dma-buf: Make locking consistent in dma_buf_detach() drm/client: Prevent NULL dereference in drm_client_buffer_delete() drivers/dma-buf/dma-buf.c | 4 ++-- drivers/gpu/drm/drm_client.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.37.3