Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1747280lqa; Mon, 29 Apr 2024 19:28:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUItdIu+Uw/hkoX72THpZTlA4IkyRcc/UCtGP89eUF4MqRryKKlnDJJPVlaYS1JYwpVv9yPy+HR/bXJS7qTWZXWklyV4Z7gOYOo2ENQXQ== X-Google-Smtp-Source: AGHT+IFLKNQXTvdgeCBFMuPUAwfRcf+4DpaYBb7zQousTsPfDTpd4R6LZNRB5mXR2h/9aN0/iGlF X-Received: by 2002:a17:902:ea0e:b0:1e5:d021:cf02 with SMTP id s14-20020a170902ea0e00b001e5d021cf02mr10785707plg.36.1714444100820; Mon, 29 Apr 2024 19:28:20 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bj11-20020a170902850b00b001e6764cd77bsi20864560plb.350.2024.04.29.19.28.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 19:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=jrQ6+cwu; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-163266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D657EB22980 for ; Tue, 30 Apr 2024 02:26:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61770D2E5; Tue, 30 Apr 2024 02:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="jrQ6+cwu" Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2057.outbound.protection.outlook.com [40.107.13.57]) (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 672C88F6D; Tue, 30 Apr 2024 02:26:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714444009; cv=fail; b=sT583sqTciz3woad2tlgT+crAGWL6kvcIL78Uekm9i/9HaesZn9FAHp8ixLfCbO4c+BfpsYUK6RjSyVRQGh3Xxu8Siclb5b36YzeTu+N7PIxPxrNm1jpzB8Dnu61lIa2nnftxjGsfwCsBkc5qPjBEjDh7aziCj3LF1FRAmnEA6Y= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714444009; c=relaxed/simple; bh=dQSPoLDIcVXVrv0tT04ckAFmdGEmehBwmhmU9tWQVAE=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=ANmn87iutPXW9KtcOqGCSlIDZqquZ/ZBnaNtChsptLw+vI7qJvxngM5SFJGOvPxDFPiSZWwJnn7LgnxXXK833PSOouEqjdFYOYajd2RdP+1olk4nfd2OJwoEIgufIbTUBz76FJP+vGpZE/HSTGlySegjX8eub0WDY4ITSOXrjas= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=jrQ6+cwu; arc=fail smtp.client-ip=40.107.13.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=doDv4Uh1O3TMrPbmopdu+qH83dFCRh9LejiCq1n/F64upT+SYvd++Js95ZHIwPSkDRhw070jtXg201CPcGANN/GUsXDei1Jd+YBHDtCA5IWqYT0aUypf1gCNGr3hOT624lwmjwoHclEonD9XMQp8xDeYxQzzy3Llw9Nu1XRo2OrP/BWIF94WuWdNErru3h5gT/VKlA1NF5tR1uPys9/WoOhZqP4ygJSulr8gYqMvr+tj9X3zE2c2g/jIEQ4A8n3YsJEUFZrkI1gpqTteVFB7GbCwBdnl3E8zUrhvYyHMHDfp5pxkfZU+N7HhVHrhkSspewq3iU0IIKRT115oSs/v2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bvk2WSknsLFBnpPpKJal9z4Uv8JTVSedgC7r7i3QLwQ=; b=CqT2w9zfsUp6frm8dmuEDZKDeJrDZt3eYn5p7VoykDHEIB63idbJKyX2+FAQxIVzwXkHRsrDsaip7erxnp3yt/zJgCwNvZOAQWW041mAiinUVE58RGa4MkpylOm7yL9SPrf4UEb27HtyM+0ASjgK12x1ZhOEMHOW1W1uNIFaJhyjttoIe32of4U1pV/0xkJHx4iGHjJjZEtj0xVhBSoF6uygPpLA7yG0IirqA44obztAM1DjNEzGGJvKMzSlGIofgukQ6eP/spJ0vslOF+cCNETNI97EGKBwCyIdB+jwzH91s3y+3cdm3CjjWb4XoSIeQyLX1FYcorBPi4Gh3ExjZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bvk2WSknsLFBnpPpKJal9z4Uv8JTVSedgC7r7i3QLwQ=; b=jrQ6+cwulmdlHqFZ+NolDeAaHmsFLs1W6ajmo8CscAuPxb9hNLpCZM17MIa71kQ7ErBQrH39q3Tx07PIdOAAFFzE/445+x9po8ugWi4sSvm2OMEOSWNh6g6GiFUQSbLD2SHokqu/DofCln2Bz4nUFUUVr+Wq7oC/Ch5Aau1QaOk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) by DUZPR04MB9983.eurprd04.prod.outlook.com (2603:10a6:10:4d9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.32; Tue, 30 Apr 2024 02:26:42 +0000 Received: from PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::8589:eb00:ecf3:b4ca]) by PAXPR04MB8254.eurprd04.prod.outlook.com ([fe80::8589:eb00:ecf3:b4ca%6]) with mapi id 15.20.7519.035; Tue, 30 Apr 2024 02:26:42 +0000 Message-ID: Date: Tue, 30 Apr 2024 10:32:58 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] media: amphion: Remove lock in s_ctrl callback To: Andrzej Pietrasiewicz , Ming Qian , mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, imx@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240425065011.105915-1-ming.qian@nxp.com> <20240425065011.105915-3-ming.qian@nxp.com> <8c39b3c3-8146-4418-8835-6dbfe38a85ec@collabora.com> Content-Language: en-US From: ming qian In-Reply-To: <8c39b3c3-8146-4418-8835-6dbfe38a85ec@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS4P192CA0045.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::25) To PAXPR04MB8254.eurprd04.prod.outlook.com (2603:10a6:102:1cd::24) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8254:EE_|DUZPR04MB9983:EE_ X-MS-Office365-Filtering-Correlation-Id: 49640a1f-f84e-44cd-b1b7-08dc68bcf906 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|366007|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TFJYZDZBUGlsbDJKZVhLN05QdnorRDh3eE1lcTRRc2FXWnJ0UCtRSzR4dmc5?= =?utf-8?B?T3dOUWxnVDRUZEdaanZkOFdNRjBjQWhrN0JFaGlNUEMwcXZoTXNJTG8wcmJR?= =?utf-8?B?bVhEVVFHL2tmSWdBT1lLMX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YTRUdG5QalVpaGwvR2RwcDN4MENFdDc4YU1qN2pocVFIdERS?= =?utf-8?B?azRBUGZxZnNiUEhjN2prUWJ4Wm9tU0RiOUcxa1g4T2V5UTNYTjNaUHpPU2t1?= =?utf-8?B?dWFSSGc5c2VtS1c0UGxWRzBhZ3lLL1JmV3JPNnh6Zy9PUVFhZUdVelNZRWNZ?= =?utf-8?B?cFp3dlk1Y1pleWVnNU1XaGJEQVU5OGgvdWJYRW5iSm9oRmt4RVU4OFMyUjhj?= =?utf-8?B?L3RKcDhvTXB4ZVdyd05LMlZnU2ZtQk1nTmJ0aDRVNG12SnBZMFA4KzVEYjJo?= =?utf-8?B?VUlMdVJpZ1FwUzNaQytJRUMyUU8za24vM09sbklBREtxVFpkNm44UVBJelBF?= =?utf-8?B?Q084U2FIankyU08zNE5zZ3dacSt5NEtMUFVrb0lPd2RPNGlNcEVxWmJHeEQy?= =?utf-8?B?NThSTENpMzlzNzgzaVFHZXIyalpTendaMG8rdU00SmxlcjlSLzU0Qzdudmd5?= =?utf-8?B?TFcvVDF6bGdzSC9EQ0hZQkJvcDVHc0N3SHdPODd6OXRPckl2RGxNQzFyRFlo?= =?utf-8?B?Z0hSZFo3OVg0Q2IxaTJFc3ZBajRnNXlLRFRkdC9NK0NhR1poRlBmUDgwK21M?= =?utf-8?B?SVVkWEl2eTRqM01UNi9JeTNZemg3ZDN5MFFBeFA1eDlOdytadENHVlBGbFYx?= =?utf-8?B?d0VOdDRIc3JqZTlqRUJvd0ZCazgyVm1XczNXYUtHSEczL1VKcEdwdVlnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8254.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OU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cDlTeGRJ?= =?utf-8?B?Y096OTVNSXpmakZBQ01od0ZnSGZ6aUtITWNRbE14QW9YOXZodytaSllPUExU?= =?utf-8?B?OEFkeEMvWVorZEZuVXVXdGNrTC9ydWo4c2NhcndvUVBiWExqZVJXd2tLaXJr?= =?utf-8?B?M1VqUFVmNkF4ZGlEQ21PL1VPNjk3Y1RHL0YwcVRmcWx0WGF1UU93c3grc0ZW?= =?utf-8?B?WXlIV24vVmp1V0dlWk1BZS9Hdzh1dEdncXZOVGdIRllXUXdXbEhYRFh2VkpN?= =?utf-8?B?cHNpak8vOFRIaUU5emJDYzE0bXdrUkxNMHc2UlNVdzlkSXQ4bU51VFdzMlNX?= =?utf-8?Q?hN7sPB8DH+LBxbSrVaTbePXrL?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49640a1f-f84e-44cd-b1b7-08dc68bcf906 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8254.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 02:26:42.2064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7KrQMr7DWq1hu4zolrpqTC8k95F0DaxtzV0p31CK3F3rbPz9I82VNfLTaFYZprTdO6aLZ/nks6unQOTzHdU0ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9983 Hi Andrzej, > Hi Ming Qian, > > W dniu 25.04.2024 o 08:50, Ming Qian pisze: >> There is no need to add lock in s_ctrl callback, it has been >> synchronized by the ctrl_handler's lock, otherwise it may led to >> deadlock if driver call v4l2_ctrl_s_ctrl(). >> >> Signed-off-by: Ming Qian >> --- >> drivers/media/platform/amphion/vdec.c | 2 -- >> drivers/media/platform/amphion/venc.c | 2 -- >> 2 files changed, 4 deletions(-) >> >> diff --git a/drivers/media/platform/amphion/vdec.c >> b/drivers/media/platform/amphion/vdec.c >> index a57f9f4f3b87..6a38a0fa0e2d 100644 >> --- a/drivers/media/platform/amphion/vdec.c >> +++ b/drivers/media/platform/amphion/vdec.c >> @@ -195,7 +195,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) >> struct vdec_t *vdec = inst->priv; >> int ret = 0; >> - vpu_inst_lock(inst); > > I assume that PATCH v2 2/3 might cause the said deadlock to happen? > If so, maybe it would make more sense to make the current patch preceed > PATCH v2 2/3? Otherwise the kernel at PATCH v2 2/3 introduces a potential > deadlock. > > Regards, > > Andrzej > I actually discovered this problem when I was preparing the v2 2/3 patch. But in the v2 2/3 patch, it tried to add a read-only ctrl, then I just unset the s_ctrl callback for the new added ctrl, the potential deadlock is caused by call the s_ctrl back in a locked environment, so after unset the s_ctrl callback, the 2/3 patch won't trigger the deadlock even if this patch is missing. In order to avoid encountering similar problems in the future, that driver may set or get some ctrl, I added this patch. Best regards, Ming >> switch (ctrl->id) { >> case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: >> vdec->params.display_delay_enable = ctrl->val; >> @@ -207,7 +206,6 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) >> ret = -EINVAL; >> break; >> } >> - vpu_inst_unlock(inst); >> return ret; >> } >> diff --git a/drivers/media/platform/amphion/venc.c >> b/drivers/media/platform/amphion/venc.c >> index cdfaba9d107b..351b4edc8742 100644 >> --- a/drivers/media/platform/amphion/venc.c >> +++ b/drivers/media/platform/amphion/venc.c >> @@ -518,7 +518,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) >> struct venc_t *venc = inst->priv; >> int ret = 0; >> - vpu_inst_lock(inst); >> switch (ctrl->id) { >> case V4L2_CID_MPEG_VIDEO_H264_PROFILE: >> venc->params.profile = ctrl->val; >> @@ -579,7 +578,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) >> ret = -EINVAL; >> break; >> } >> - vpu_inst_unlock(inst); >> return ret; >> } >