From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796354918; b=AIdQudFWtP1zgr3EFJ/4C/18nXSqtieEP6uLFGPnz9Oh9wlxKtnJzzPBRcW0tLcs5zJf 5cRZm0nMS3/zBfaQVYLqiy8VYTXclZ5jhYWxZrb1yiUUuO82Hab9Bq1q5vAUy2PWruYqM mel0o4ULXF0pY1jtWEVBQqAQuoS+1d9YHWctFpBvTEm1htPGGErn3Jsq4/AfXcQp5df3Y 6GEdUVSaG21ib2DCIXdS8kxF3g62vs1mPi/fxSFCKWjMOe6UBx+lunMR0YzY1VR3ePzxi ONOQ88g0VxPs44CeFYHRilcs7IWExEmrgjcI98obTeHE+J2jM4EB3rnq0ND2S9kzsew== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796354918; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=5bUpbhKXJ1UsZ6P2ioL8a3GNTbZGLaIGtNMTJBcGzto=; b=4mGbf5cMuo3BptKxEWdw5v9GVluYcjwecyX8vfoq9fPbgccG7LgUTUaexFre0HwAy1Ul Ga72Mwfw1yaVceBSpXty8uQzjOCkNJ/z6rSpURre/xv45NOSUZS1Qf8pKhw13wp2nyTqJ Cy0utEVxzD5h5jkQCDgWyb+1EgVlO4Tm6fEFqzgiZxFTuqqdAEwI1z5+yeh6fXXPeo8Se kb6fu5KjhJ3laV0jkTLUwOFjkg5h5m39dhBDL0l0/RIDHK3lqr+a/SUEU8oh+FEkcdG0S wJSSgIYf0jF1/0b1z9Z14gYZ1EJy61QvHxYc567QKlMy1I5xYXoghrDGFDShf5IsGbQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vybpx0rU; arc=none smtp.remote-ip=209.85.215.170 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF376606A322 for ; Fri, 4 Dec 2026 03:28:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AF376606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vybpx0rU Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-cdb75699c7cso205870a12.2 for ; Thu, 03 Dec 2026 19:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796354917; x=1796959717; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5bUpbhKXJ1UsZ6P2ioL8a3GNTbZGLaIGtNMTJBcGzto=; b=vybpx0rUbRlz3e4Jp1U9RK0ENHP4RJN5ZAzT4O0Wj45lR/f46PSn/AUOPgJWwGBquF CDfmiXJZfwZ2xqfB+FEomQCSER+Dj2ATWg/j9XtgXQajUR6ZAC/X5dOGG+CkJo/X/q7G CQFp4WeFu9ucXfHL1bbHFHEcRtwnkGMWSsFBXoOLykn6sJWbhkPXyeBRmc0J0R+yTz7w STdcyhVdRcP/zMMhTTw8EGMJSQB/euQHVmVVImbS3RvAsWfhWAop/gxqMjUs54A8dAUR eq285O68MuR0VUCGJjyt3gC1HA3Lk5BxO18g/E7KcPiugClsy0PiJi4eDqaRXWw0/fZd oP4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796354917; x=1796959717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5bUpbhKXJ1UsZ6P2ioL8a3GNTbZGLaIGtNMTJBcGzto=; b=mH9NsascrIzx9bfdixgsQyEyi+wvruFssxWna4ZD0o9HRQH5rlyCmrmd+OCKwnk+ya peQKt+EL80skYneXEUGv8cy4K20myffIgdKD/m8/3tL0CT+MEDbqowJ87PPmaLb8G04E idQydxPmbUepGfPs6YVcq9HNBCwiZi9N/yqgsF1quyqOI6qZ/0lc92qk0CDbNjfGtQ5S JYqQBwbs7B1oySYtztZ08iGF2es/NTw/XWjP9AQSpDXOILUTH4Iyd/ks2NXCAWBREcP1 9xP+xOpFqGu8njKA/0LcbNb4XRBqjoJZB7iN7D3LliEZtnuesYkyqVVx7Mv1e91+Er2/ kt5A== X-Forwarded-Encrypted: i=1; AL+hErFNA/sstgPOpuJR8bnOxxpzI5NTwATOpT5zAP+M7kD4aactz67v6iylxUDi5KnU9muxvKzaPNCEtgN1q1Y=@vger.kernel.org X-Gm-Message-State: APuU4Z/lD5SP50GjhGJjF14Io33uHpnAJRRD6MH+Xrw1Jheh9889QGJn p33/tYFCZxTozYqIn83ldXEmCo2SN5xXOrDm20SZtOQAaVTmLCAGjtjef3vHCh3/ X-Gm-Gg: AZFdTZeT85f57SJWf0mX6g3dQQH0igu3NTzTS6dNl/QAP9emi4HTdZWMcwYZ7DlaMEi v7x3qIkhL6LyJYNR9RrgaPw1JTRaiijj68zYV1MFxTDGhnLNZEIo/+8NXu3SnHrjiLfcZxeUDFH gyqgV2MXu2LOvgHq0cA9VxZo1+GbL2vBjO3YNjE+i/pz0OO4BwGAQm3v1climUiX+G4wLATWp3g VNkTTsfXBO2tGILCjsTHlnfr26YqhCvi2zsIqRBlr7/q9TT0ixY5jxwkvgrb2xEK+hGKHewCTTM 7g74KBfftdTNx23uN1P8Ebw8Kmv7OeiaPvF8B59hkJug6PD2Wam9VpvG84Z09xdLa2jWZcHDOus sVm7HqwJRMH7yQ3uClZWpFmVsp9EnAQpzU7lCyg6Ku9/cumt5bdrJUI3fEB+oivEr+QD6z/KcZ7 rmdGiDnMb7OvqoLHybgFfCDt4Gx3kHwTleTxSxo4qe3ST1onJ60Z9412qTEegdRbVc6p0rlJX02 n7QfVzTL7zX6pS37MuMrGcSh/AXr9bqOa+cJp/xbX0PIO9+9lz/ObT+dPse37C1Gy8YaBcYl2hS rmYJERRNxpOcWspl9sEXj30uSEM+2V6cC5nlI8hXIPmNYcxXeiHxhpA= X-Received: by 2002:a17:90b:4c4d:b0:3b0:abb7:3fdc with SMTP id 98e67ed59e1d1-3b5e067c394mr477950a91.60.1796354916917; Thu, 03 Dec 2026 19:28:36 -0800 (PST) Received: from server225.. ([39.170.101.209]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce1235c40e5sm425194a12.16.2026.12.03.19.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 19:28:36 -0800 (PST) From: Ping Li To: ben.horgan@arm.com, james.morse@arm.com Cc: Ping Li , liguangshuo@mail.sdu.edu.cn, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, reinette.chatre@intel.com, fenghuay@nvidia.com Subject: Re: [PATCH] arm_mpam: Free error_dev_id when destroying an MSC Date: Fri, 4 Dec 2026 11:28:31 +0800 Message-Id: <20261204032831.3091380-1-leeonion.muyu@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: <20261027111914.850854-1-leeonion.muyu@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Ben, On 03/12/2026 16:15, Ben Horgan wrote: > With this the msc->error_dev_id is still leaked if the probe fails. As such, I'm planning on taking > https://lore.kernel.org/linux-arm-kernel/20261124135843.2276437-1-liguangshuo@mail.sdu.edu.cn/ instead of this patch > even though you did post first. Thanks for taking a look, and for the pointer to Guangshuo's patch. You're right - mine only hooks mpam_msc_destroy(), so probe failures after mpam_msc_setup_error_irq() still leak the allocation. I've read the devm_alloc_percpu() version and am happy to withdraw mine in its favour - devres cleanup covers both the probe-failure path and device removal. Glad the bug is being fixed either way. Thanks, Ping