From patchwork Mon Aug 19 16:47:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 13768646 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2071.outbound.protection.outlook.com [40.107.105.71]) (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 921471422D2; Mon, 19 Aug 2024 16:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724086048; cv=fail; b=Povza1dPV66mWyoxV2cqUBioRD58CM/m7rrs+9as2VUaiAp6RKWaIM1X60e68NvU2moDhOiQmC1O7e7nb+F4LH54NjVHy7fYXWibMyMFGkMey+8GhPOEktfjIeEj/ClQrV+AOv4iJIzteBSWCeakLqw2VciAjz7nXlA+Ar1VACs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724086048; c=relaxed/simple; bh=Vjy4xFXKz5DKI63k5y+4R8F+XOPodgKoXAHnMFKrQ3w=; h=Message-ID:Date:From:Subject:To:Cc:Content-Type:MIME-Version; b=nt0Sn/S4uXz4unj6nCLbl+EWMum1XaYU/LFhMf8HYjex3fJCqy/0aUmHbr8SWUiwSv9P14Cd1eygeek9cNxQDw/XR290kLWpMBj1wRrsDeXW7f5fqsibRDvrQ2SdVo9L1exKNUNkjRj40apoR1bVLuIio/SBGeT43zlvfdWugmI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com; spf=pass smtp.mailfrom=siemens.com; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b=oxHAhN7o; arc=fail smtp.client-ip=40.107.105.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siemens.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b="oxHAhN7o" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tP3Xr4RYi6F381hISkgZYFIS4ARTDHnc8rCLF5APWVmdXHEHzdQwmVq473ZSxJYkrJdo0kP4vPRLs7Nv9zrpaXFH0fhCkrIeq+2gpR23a5TtQwS8RloJvK981F/plEnpbqB3wcXlyyQpnPpWBK1vOWduMaVYad8sgepIT5OgA5ruunRGhtzR0oj0S7yJU3ScqD8qzEUCA4FeEjS4d7uBeJ7xzLyZWVHRiUlBh/GxtAo9ry+n1v0RQdjadshr5WHMhwQ/35lptP0/idzkvasDTzcRd+6jWKNAJx487Ph9/kj2b8HS33dgcuTgDPeYpEcqYKlBMrEh6K+dWHYU+jcVbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=T8FBTElBdhmV0DJEfFDqju5Y3nhEZSc/mXHS5hkwC3c=; b=tljB5qlxRDiIygRAIzkCtH1zbCalHVHKMGnbEPSkAgqTqbHYMrCn3KS5FA7sW6pQkCHPffStI2NpFFmHJISK9nZKLRlKtCFE987z6CJ0Ji48ETXzyrgW6sC7bZXWTX6aZsL5ew0DQH2UqWz0ZuPkgrAxQps4i5UT5O2MNmbznYZ4o9Ko6uR1AoeS2/4MJCf0+un6PYWTLdLGx1vp7huxhLX8ZbIBRj7G2jN43zkJtWFGlobtFRww0iRx7gczWP7kXbj4e3RUSeQEjimw6B8/DXwPIgtD7wJthZmIBap4Lu0f6xSH9phM8Zw+pK7urjN6BCTAMQZKXrCYCiKkPDriCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T8FBTElBdhmV0DJEfFDqju5Y3nhEZSc/mXHS5hkwC3c=; b=oxHAhN7oOZ0YKWIp8V/1/IjLm1ShlZgi42JXNUf22Y7OOOeICVPL2p9QoRjMcANimiolg53jrEh9j30Tkg3ZmsIHdfl6TT9rFBZnI+kebZut9E9QNlAha+mBD+m3tAv6jWMODbEw7ZZVCF4nr1q1QKL/nvUo0ZEg3uqGYWzQTo+eXxNqyPGcGIhubq2JekCu21WnAo8SobsTd9c9vqBCN3hR6/xKK0PX67eLLkVDv3lWeLuTFICtWSgjRy0ALSoA1pxmTsckQdtdVZOCAz8DV1O91CfjihyZLZjrOpFdqmITZI6F7+0OZFr3Z00TSBHBXXIAryOk5npjj4kSh3/10A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by DU2PR10MB7786.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:46e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Mon, 19 Aug 2024 16:47:23 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8fe1:7e71:cf4a:7408%4]) with mapi id 15.20.7875.019; Mon, 19 Aug 2024 16:47:23 +0000 Message-ID: Date: Mon, 19 Aug 2024 18:47:20 +0200 User-Agent: Mozilla Thunderbird From: Jan Kiszka Subject: [PATCH] remoteproc: k3-r5: Fix driver shutdown Content-Language: en-US To: Bjorn Andersson , Mathieu Poirier , linux-remoteproc@vger.kernel.org Cc: Linux Kernel Mailing List , Apurva Nandan , Beleswar Padhi , "stable@vger.kernel.org" , Nishanth Menon Autocrypt: addr=jan.kiszka@siemens.com; keydata= xsFNBGZY+hkBEACkdtFD81AUVtTVX+UEiUFs7ZQPQsdFpzVmr6R3D059f+lzr4Mlg6KKAcNZ uNUqthIkgLGWzKugodvkcCK8Wbyw+1vxcl4Lw56WezLsOTfu7oi7Z0vp1XkrLcM0tofTbClW xMA964mgUlBT2m/J/ybZd945D0wU57k/smGzDAxkpJgHBrYE/iJWcu46jkGZaLjK4xcMoBWB I6hW9Njxx3Ek0fpLO3876bszc8KjcHOulKreK+ezyJ01Hvbx85s68XWN6N2ulLGtk7E/sXlb 79hylHy5QuU9mZdsRjjRGJb0H9Buzfuz0XrcwOTMJq7e7fbN0QakjivAXsmXim+s5dlKlZjr L3ILWte4ah7cGgqc06nFb5jOhnGnZwnKJlpuod3pc/BFaFGtVHvyoRgxJ9tmDZnjzMfu8YrA +MVv6muwbHnEAeh/f8e9O+oeouqTBzgcaWTq81IyS56/UD6U5GHet9Pz1MB15nnzVcyZXIoC roIhgCUkcl+5m2Z9G56bkiUcFq0IcACzjcRPWvwA09ZbRHXAK/ao/+vPAIMnU6OTx3ejsbHn oh6VpHD3tucIt+xA4/l3LlkZMt5FZjFdkZUuAVU6kBAwElNBCYcrrLYZBRkSGPGDGYZmXAW/ VkNUVTJkRg6MGIeqZmpeoaV2xaIGHBSTDX8+b0c0hT/Bgzjv8QARAQABzSNKYW4gS2lzemth IDxqYW4ua2lzemthQHNpZW1lbnMuY29tPsLBlAQTAQoAPhYhBABMZH11cs99cr20+2mdhQqf QXvYBQJmWPvXAhsDBQkFo5qABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEGmdhQqfQXvY zPAP/jGiVJ2VgPcRWt2P8Fb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okCsdYsTbk= X-ClientProxiedBy: FR4P281CA0126.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b9::7) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|DU2PR10MB7786:EE_ X-MS-Office365-Filtering-Correlation-Id: 4829583c-99e2-468c-e632-08dcc06e994a X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?b3pOAmuO6ZWy00J7481HQTHyjUC18fK?= =?utf-8?q?UQfZPFl8/nLo7D/agBesgLGKIAUUXCsO1BraxH+oHkuFTUjfNqUYVWM/mSt6uD0yF?= =?utf-8?q?73iGpsmkj0KronQeDn3ZGHJgrHwl1ew5D/keGMkpkGR+coBekhUTqLs8FKlX58GoR?= =?utf-8?q?vl39rxQsG88dfeWkFx8wS6KnszQi+oLcmWlNlDCUIqQOV71C8PGgyFoTxQlMCfoos?= =?utf-8?q?ozIXli80SdUdDVEap7ejK8nBrNTvfYjR4vGjRj6fig3RvU6Yo4EotfjIVHCjFBZQs?= =?utf-8?q?xbRoQu3ppLl02uwCeKIZHMlTVJTgzBZaTpgVTaIBgRlgcncGHXrROpMaBTwnkY22q?= =?utf-8?q?4s0wojOJ4IlgUv1mj3j7OVtAPuseXWBr6zis1FYt4EipNOXBcm5l26COV0EDNsC1R?= =?utf-8?q?HLyrQMBQWxYblKMGqwGcmxaiGe1jTC3/3pL8AUtPAPn+mTst/3ex3uvXDHg+4doGz?= =?utf-8?q?GcpMUsiOvD117NVzJehEXyE6UCjvEnNX5iy60lWOfllX+sY3asRKVHLyIP2B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.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?J33mjuPqkQMuZ7MXj0A+UbpxlBMJ?= =?utf-8?q?FFOXJzjD1fUGxlrVp4iV0+4LBe0C6XeUZVYn1WNDmtZWVmXvNVUUCjeZyI9AuAhWO?= =?utf-8?q?PY8po28I1hjEMuxmxQhvi7rwXN5pc9x3EQEJidTHB6l3dV6VVT2fk60qvSswv6TtT?= =?utf-8?q?htIKl7Ufq2wjWWNJ3UqZxRYc5UX7VNp9+94whKPGm21w08C6wYVokMng8JX+GglIo?= =?utf-8?q?WPdxxXlhZCXV7grBoVMYCn3UdMy4iAocpuj2DiJtIdei3r4janQIpZ1cfAK4/8hfY?= =?utf-8?q?cpcNra2y19eEvw51hHUm7mQ2cXRJb/syvVK1LXNQUY2tyrahJR6w20LQ3npknbZTf?= =?utf-8?q?529dKgjOetPoPFAm9F/a1QxhuejX17hOcbD89P4pODGkyL9ydE2CNnyw+2Rs2NtR5?= =?utf-8?q?LQLXYydrc1ienm3oN3GusqQtb0OAr+J3TH7KXliXUvl3+brairrYBGpeERtKXaxyU?= =?utf-8?q?e0/XEkGdviVkQXDduyuNdfdlcVoXAOo4TIxnShrmN7zkwU5fvkRnI63UCVtMMFCnm?= =?utf-8?q?J9pUBNPuEtAr7IKqoOPN8bgCOsOqV9aP1oRO5iQISQQ91rFAofcybaAV8m3AGKfjk?= =?utf-8?q?9wyBwk6euXaw8DYYKPIE40AsAw1UDGZ5bWm4o/nP1IeMjMmag3xao5bz5yluADAyb?= =?utf-8?q?qPdtyU+QOCB5nQOjxumguZRhPibSmFFmiWp31Fh9t7vnozJWKPIwV1QxU/LIMPExu?= =?utf-8?q?bsf2I6ZUCO5q0dCvzL2CPTThLe9oZ/dVxh0jaK3jvnApjy5IY5tpVc5QRw+mK2Anv?= =?utf-8?q?BrJLKPfoEXxnYXzkVJw/govRIxHV5PUmk8/xcI5jhUE7LCqzGIGA7aoAnRX0JeKM6?= =?utf-8?q?JiIZydFiK0l2wUJ3jlBVRYoWZoJ9I+VymFDJGImAdg4PSHP2zG/Kkj366gltwThCT?= =?utf-8?q?Ra6CVs40cWd3zDc7ZFIXpcg8VtC9yYtdpz03T8avIM1Be6m6CzcU+AeKoLkGiBSWJ?= =?utf-8?q?tSetH9/dMjHnLgoNMKJ6h/fEWQTW9LjUx1S6/IO5AA6gVaMxq9mLJgwm1ZFfPCyb5?= =?utf-8?q?ALUwHjWHIK+bj4v/A1a5wrmfRjrq+VNJzOUAWIPFF07Cr/Sq9XZmuJbghK0NCUpIE?= =?utf-8?q?ONo63BIDAdmQdcYX/iVluXUKRYCyj2bsDxlTPzqln4wexL+dIf1taWk/hSWd3qUSh?= =?utf-8?q?fyRcz+F9MP4RQXuxV7kSlL7MpoXLMz/Xt/HiS7NQ5zFz7APseFSk3xLuNP8P0OWVf?= =?utf-8?q?Dh/olXYik/dphF0s5D8BtmXXswTr3I39LQLgaNNxVcesTQhlEqkWLC8YejnYRLcG7?= =?utf-8?q?+Wh+s+6fw/yJgDA5k/L7SjiNtWhWUffS8Wp9QgHOObl9hnQLsmDp4JhNZyDukpEji?= =?utf-8?q?Si8m+Ph5P9YEoXtNLWhu/JM58IMAvpqlaSI/XtcQe/559SfrLsiOsA2100SQ66pGM?= =?utf-8?q?wmhLqBR3PVkph/ywvXx/iWmS3qUCeNxWv8QjW051ol+oFuF+cU5EVMxn1/3wB3udX?= =?utf-8?q?8NqcRDc8Kxv+iIVzq9zhA2JoZABB04RQG4RIj9Bm4/lzeAxOh5yvge1U9Qk0LvBrf?= =?utf-8?q?geDg1fYeKyJvPJu8V3Bx/LFBpuopsgGm7Q=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4829583c-99e2-468c-e632-08dcc06e994a X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 16:47:23.1274 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IqgiNqcTlkeF+2yJ3t2oSYSlxl5cPHIU9yHGH79zz8iraaqEHmCoYuex61ijnEn2QPRaCFxnYtz7UG/0qHE5vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR10MB7786 From: Jan Kiszka When k3_r5_cluster_rproc_exit is run, core 1 is shutdown and removed first. When core 0 should then be stopped before its removal, it will find core1->rproc as NULL already and crashes. Happens on rmmod e.g. Fixes: 3c8a9066d584 ("remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs") CC: stable@vger.kernel.org Signed-off-by: Jan Kiszka --- There might be one more because I can still make this driver crash after an operator error. Were error scenarios tested at all? drivers/remoteproc/ti_k3_r5_remoteproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index eb09d2e9b32a..9ebd7a34e638 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -646,7 +646,8 @@ static int k3_r5_rproc_stop(struct rproc *rproc) /* do not allow core 0 to stop before core 1 */ core1 = list_last_entry(&cluster->cores, struct k3_r5_core, elem); - if (core != core1 && core1->rproc->state != RPROC_OFFLINE) { + if (core != core1 && core1->rproc && + core1->rproc->state != RPROC_OFFLINE) { dev_err(dev, "%s: can not stop core 0 before core 1\n", __func__); ret = -EPERM;