All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	"open list:DRM DRIVERS FOR XILINX"
	<dri-devel@lists.freedesktop.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Michal Simek <michal.simek@amd.com>,
	Maxime Ripard <mripard@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Bart Van Assche <bvanassche@acm.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	"moderated list:ARM/ZYNQ ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/2] drm: zynqmp_dp: Fix a deadlock in zynqmp_dp_ignore_hpd_set()
Date: Fri, 7 Feb 2025 18:33:17 +0200	[thread overview]
Message-ID: <20250207163317.GA5869@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250207162528.1651426-2-sean.anderson@linux.dev>

Hi Sean, Bart,

Thank you for the patch.

On Fri, Feb 07, 2025 at 11:25:27AM -0500, Sean Anderson wrote:
> From: Bart Van Assche <bvanassche@acm.org>
> 
> Instead of attempting the same mutex twice, lock and unlock it.
> 
> This bug has been detected by the Clang thread-safety analyzer.
> 
> Cc: Sean Anderson <sean.anderson@linux.dev>
> Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Fixes: 28edaacb821c ("drm: zynqmp_dp: Add debugfs interface for compliance testing")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
> (no changes since v1)
> 
>  drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index 979f6d3239ba..189a08cdc73c 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -2295,7 +2295,7 @@ static int zynqmp_dp_ignore_hpd_set(void *data, u64 val)
>  
>  	mutex_lock(&dp->lock);
>  	dp->ignore_hpd = val;
> -	mutex_lock(&dp->lock);
> +	mutex_unlock(&dp->lock);
>  	return 0;
>  }
>  

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2025-02-07 16:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 16:25 [PATCH v2 0/2] drm: zynqmp_dp: Use scope-based mutex helpers Sean Anderson
2025-02-07 16:25 ` [PATCH v2 1/2] drm: zynqmp_dp: Fix a deadlock in zynqmp_dp_ignore_hpd_set() Sean Anderson
2025-02-07 16:33   ` Laurent Pinchart [this message]
2025-02-07 16:25 ` [PATCH v2 2/2] drm: zynqmp_dp: Use scope-based mutex helpers Sean Anderson
2025-02-07 16:44   ` Laurent Pinchart
2025-02-07 17:06     ` Sean Anderson
2025-02-12  8:01 ` [PATCH v2 0/2] " Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250207163317.GA5869@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mripard@kernel.org \
    --cc=sean.anderson@linux.dev \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.