Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2758576rdb; Mon, 12 Feb 2024 16:10:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1nsBqj79+LQwWh82pJ43vbNS2QWlm/mF6C2m02BH0DjRtF6QfDp8BIdfacvITwKtgxOvSktN8n1iiN55b5o+jUZErxmG1bncm7CtHNA== X-Google-Smtp-Source: AGHT+IHmVsVuKn2N3MFtejSGO2C6N8y7Rk0M5KYoXXC8uoWxANmgW4lYlP2j83nezdo7ncCRkAqv X-Received: by 2002:a05:6214:d0c:b0:68c:c6ff:2fd8 with SMTP id 12-20020a0562140d0c00b0068cc6ff2fd8mr10353872qvh.49.1707783037954; Mon, 12 Feb 2024 16:10:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707783037; cv=pass; d=google.com; s=arc-20160816; b=DPCq12scxtOfxznUzvBO7TqjAZ1xRzMwttP199H9SdSWD9KXb9zD3qVKj58tw5XCPf 98qFaHo6Aqgmb30ksjjuJEj3nWRqPKbfhckhsa/f/yZ5d4ymc+FWADrQusE/rCIZ3tnD rDxetm+6y1PXt/aTvcabB6Yg7dLKPzbaOQI4qh5dyb8q9u7/5Xkew0kgQ6ErSk5zDKPL EuEraHO/pnn4LLxQlg7Moes9W/Lc4C9zAjYi6bQ2CBaaMLSm8pfwrqQ1ySbM6atvIFBL ekyQ8MYbwiwhdJpeL/k2LVqDzYhDveKKEIBY8R56UntVjc7IVsaUqmlhOBNoRAfrsYbe Z/TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=SKTZ/3gDrjTrmPt81XU/FfX33drgx94XxgkNqX5kp7Y=; fh=STFhxYPFM78Lesy+qczeBaszOsmhcoNMgiJk+sOphQY=; b=pK+2WDJzAvTPJqILGiXMGluB8ATnJvvTmXjUxSvDe4KqhwFObtoCptZ95QybBbDNcm Bx+VZRrrPLwOUg6BC2CJmCncxXBxlM+cbxJHiikoyZxnXQEBwi8+0XKvns7Dm+sg60y8 9PT7unxebnptRz8osRKZPDKvpQtg6EplwaMquYMhS74eSHB1I5lkRtpyAqvs2VLdSP4V V9TkTrHZk/WDM6Rf4L/rTDC0oSFUi1alw7ds0Rvg0gmtr8upccBbiC12UGsttvQ0Tg8Q kH6WCj2ESm+C3xe4ctKhL2u6EyeI7D+6tpl/xHX4rzX4MfiWIjoCdysiuQsPLUhiP5vl Imog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=T25wJcfY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-62562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=2; AJvYcCXqW9MGECgXVGEtxt0fWmvBxw/bIN70xOr2fIQmBYPwRowBQMe2z+b/mgUEI/lduNx/ly+cm2756RSS0xm9lwMJwt4+br8zXVrQuoIKEg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t10-20020a05621421aa00b0068ce8312e21si469496qvc.415.2024.02.12.16.10.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 16:10:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=T25wJcfY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-62562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B37FF1C233EA for ; Tue, 13 Feb 2024 00:10:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 444FD28EB; Tue, 13 Feb 2024 00:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="T25wJcfY" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 A81781FAB for ; Tue, 13 Feb 2024 00:10:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707783015; cv=none; b=bF7zFMu+kryNUw1E3hKLWML+1TMoskG7cAiZg2Tuk+SbXMGsfkqeG/ncmwEb6fpJf9/iUHgJJZaQ6Ks9lAXCFAF3t2Qd56GbYJaDsTy5cnzQUyCD/mn4jYHS1c2zsY48gIIpJ4qRaPTN444OeuSvOXyCJzDIxru2YWB14AdipKM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707783015; c=relaxed/simple; bh=J7FejEFnbMm74uZsExP5QWA3ZxhT4NbGZP6EJnx295g=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ItwcSKhq5+XFaD0CTFC30MSrlVkrtW9zxg301CBiaqO20fJ1c5FuId+4Hp29FWIu5MlJ52hb1bCAGY1qGjgHVIWkTsybWzHkWXxTexgnqqtsNhjEFuiN3H4CAzP2yZRmBP/61ctWJlmMmhhjAr+YWsSuObm3XVU3opnYzt1Xg8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=T25wJcfY; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41CNNWC9002327; Tue, 13 Feb 2024 00:09:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=SKTZ/3gDrjTrmPt81XU/FfX33drgx94XxgkNqX5kp7Y=; b=T2 5wJcfYBq8HUo5ZGxsokAPOP8K9BC2QvE3Iz8ZTy/DCE2WQ1eRui+5C/9cXtsAghE QSNETroOGAfpQ6aPqx3GfXel40SyCKBP9FzmHNJELPk5o1xuJJgmUFTxZF5pFDf/ 3TaeuDikn35hJ1BnViB4fQ5buOj5uiFjQfXBJnywCEW0q0izkeSPTsOj5WIwuntQ Ox1b3z8sgTJBtWSDhuCfRpZttQ6sIOgS+IhfAwuKHBUv29kL5iD64Tb29GfEiQJR 0ctWmM4Nnchg6jcYpqc68DAxLNU9OZC08uqHy5IY4+UfQ8Otb6EVgo4el2ORsc0h kXui0XdyyNup2vXQYylw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w7gvjhsv4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 00:09:53 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41D09qgn001486 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Feb 2024 00:09:52 GMT Received: from [10.71.109.81] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 12 Feb 2024 16:09:51 -0800 Message-ID: Date: Mon, 12 Feb 2024 16:09:50 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] drm/crtc: fix uninitialized variable use even harder Content-Language: en-US To: Rob Clark , CC: Rob Clark , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jani Nikula , open list References: <20240212215534.190682-1-robdclark@gmail.com> From: Abhinav Kumar In-Reply-To: <20240212215534.190682-1-robdclark@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Z6k0dI9SZ8x1JhC7HruQaOgew-bmVxBU X-Proofpoint-ORIG-GUID: Z6k0dI9SZ8x1JhC7HruQaOgew-bmVxBU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-12_19,2024-02-12_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 suspectscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=881 adultscore=0 bulkscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402120186 On 2/12/2024 1:55 PM, Rob Clark wrote: > From: Rob Clark > > DRM_MODESET_LOCK_ALL_BEGIN() has a hidden trap-door (aka retry loop), > which means we can't rely too much on variable initializers. > > Fixes: 6e455f5dcdd1 ("drm/crtc: fix uninitialized variable use") > Signed-off-by: Rob Clark > --- > I have mixed feelings about DRM_MODESET_LOCK_ALL_BEGIN() (and friends) > magic. On one hand it simplifies the deadlock/back dance. OTOH it > conceals a nasty sharp edge. Maybe it is better to have the complicated > restart path a bit more explicit, like it was originally. > > drivers/gpu/drm/drm_crtc.c | 1 + > 1 file changed, 1 insertion(+) > Nice catch !! Reviewed-by: Abhinav Kumar