From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2DD637BE67 for ; Mon, 23 Feb 2026 22:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771884120; cv=none; b=T0KYVLYNmEcbyGzzHH+LbMgvtkK+GEqueuS1tN9he12DWxf6r2eGaJqi+eeWSdzk9QFHxA6GEttH0Ww0fCc+9Tj5b4DYEjDVl3sTSMHeF5ydpDKpYOc5QwLIYOCAdv/qm8XLB7jXHiYhDWsKJIh9XcsLvkPiWqWchtjXEvq2U0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771884120; c=relaxed/simple; bh=ZQO88n8Z6pB3rn69TqAFicSnk2i6LTKuvnA7swAYm2w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CglmJckEFH1mUjUSCJfVrNqpYhhyD/B1zFgp6oq58WbDiDVqnqBp9FOnSLRw1phBRbT6j+Z4n0g9jF2x5ST9tz0WtmNg4tK//fTGxQljk201o4j6mVfL69gcNXaYlSr6TG10uqfukKPzOlNoz8D2hvQMS1GE4J54lGlYqwOv6wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=WV4O6neF; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="WV4O6neF" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771884116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wmnfQ8h5kKamQdgU+WKokqdyqpwGv32hfRqe6gWmexw=; b=WV4O6neF9e+HChZe5ZRSG+pHqXOV62O6OyQNHuA8QcXA6sgkuY0tomXs/Os+naN5qdOQh7 EYHu+zzwL2l7Db3JW5bKL8LhJKObSs47TBoFx4ZF8telWDWt95YhZVWRW3i+aeefPNUogb rUrjLf2+6D39PszW+t42xXUO1P8tWwg= From: Bart Van Assche To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , linux-kernel@vger.kernel.org, Marco Elver , Christoph Hellwig , Steven Rostedt , Nick Desaulniers , Nathan Chancellor , Kees Cook , Jann Horn , Bart Van Assche , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Matthew Brost Subject: [PATCH 11/62] drm/pagemap: Unlock cache->lock before freeing it Date: Mon, 23 Feb 2026 14:00:11 -0800 Message-ID: <20260223220102.2158611-12-bart.vanassche@linux.dev> In-Reply-To: <20260223220102.2158611-1-bart.vanassche@linux.dev> References: <20260223220102.2158611-1-bart.vanassche@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Bart Van Assche Although freeing a spinlock without unlocking it is fine, this confuses static analyzers. Hence this patch. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Thomas Hellström Cc: Matthew Brost Signed-off-by: Bart Van Assche --- drivers/gpu/drm/drm_pagemap_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_pagemap_util.c b/drivers/gpu/drm/drm_pagemap_util.c index 14ddb948a32e..50cb5f9cdac5 100644 --- a/drivers/gpu/drm/drm_pagemap_util.c +++ b/drivers/gpu/drm/drm_pagemap_util.c @@ -74,6 +74,8 @@ static void drm_pagemap_cache_fini(void *arg) cache->dpagemap = NULL; spin_unlock(&cache->lock); drm_pagemap_destroy(dpagemap, false); + } else { + spin_unlock(&cache->lock); } out: