Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp280455rdb; Mon, 29 Jan 2024 01:54:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtSZPhF6AOzAUeGS1ZNd7V/2QiFRH5ZIZxiV8UdAiRBMt/JRY74EDoKdl4DV57ce6/7x3u X-Received: by 2002:a05:622a:1a26:b0:42a:6ec2:a5ef with SMTP id f38-20020a05622a1a2600b0042a6ec2a5efmr6006128qtb.67.1706522097259; Mon, 29 Jan 2024 01:54:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706522097; cv=pass; d=google.com; s=arc-20160816; b=wRGprmnZb4qkPLAWE42VDS/Qqc6VSn9i2LLVt1Wdgw9MTo6+hvAaLqu+BSalQuBmTM qn4oXanYug2YC+6Xk7B5YvHLeAwHvq1uDU3Soh9GckfuGDLlHTSPlemW1uADba8TDz9I aGlurc/ifQMjwp2gEVOZTit0GU2cJ3K1ZSHv1MI3j+T453ZepwwAATU2dGLc6S3dWU6D 4xE4Do/p0M5j2ahzzOVaw2dxKf+3BuPNq7TGAXbsO1WmUJ/UwO2616S+XjvmpX0q5HpZ AqLjb1t+3Sy5GyHQuW9Wi73zsGUc03j4WpYTVo46gMMxClt9D+xI7VrjeBU+APzg0DDa s8Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport: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=PXPCn+oYLrnbt+qWU2Af2frSRG+t1bYgfk7qBkMYuQc=; fh=aAzvcmc5xfvzuh1KXP6XIEt5MN2qjDsu2afUT14S44k=; b=uRxYhXUU7+qQpNOcD5X1mPFVmCnZ4nmyDV7O0xRRs/7sXjSfHnfD1sV8ap3iR0GXKG PptpFw1wG5AptqkIFDw3nwjbaSttYRgcKKLd2TcKCM03hSPJH6zYeH5nu7rrZ5lcLyCY uMpJehmSQGYotO14iG938B2QrITD2OtF+bUu04Db9XOb/Hr7UraWyu5ZUwVU4oin64j2 qLPXDM2L6y4kS74THFee7CWT0fAkzR0v1ev4ckoGJndZ0A+mgtkXzMpXhyuuDtB81NIC EMjHZ+urFkr7XT2+Gmu3RkjafUFCRJDAVs1y4U52IqOJ3DPw/cNvzlQL0kZ/Eu8voR+b V/hQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=MulYlYir; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-42505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 15-20020ac8570f000000b0042aa83194fdsi1079614qtw.595.2024.01.29.01.54.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 01:54:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42505-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=@web.de header.s=s29768273 header.b=MulYlYir; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-42505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 F32C11C21D42 for ; Mon, 29 Jan 2024 09:54:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F93E5645F; Mon, 29 Jan 2024 09:53:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="MulYlYir" Received: from mout.web.de (mout.web.de [217.72.192.78]) (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 8FF6155E63; Mon, 29 Jan 2024 09:53:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.72.192.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706522008; cv=none; b=k2N2F5WLOgAjAwrpeABIEGY2ljYnpVsdCrZFmn2/sg4PR84Z5p3dSNIXvWhieHQEKKx+0S7rQjkEWoX85eSZBiruE50Dvsgp0Lq44CZ7yF1hhoL+uL5D4VgP9aE7zjV+qYV/BrXueGHHsgAWzKHkDHL+VD6vJ39w8dcA4rzVm7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706522008; c=relaxed/simple; bh=PXPCn+oYLrnbt+qWU2Af2frSRG+t1bYgfk7qBkMYuQc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ApJE3NWo96F1/oG9qGhpOk9rpXWFiuicpyBG/YOw87HgKOnGUg5oo5GE6ztDw69B20GExa66SGMOeXNZA5dkNunUPi6NpcaKeu+EYhh/5Hq285P5rd5lZgZbHXsAK8Mj9l9mH2blg+NpS+5ZBRL0WujvQwzangkTTXxH+UsQIS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=MulYlYir; arc=none smtp.client-ip=217.72.192.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1706521984; x=1707126784; i=markus.elfring@web.de; bh=PXPCn+oYLrnbt+qWU2Af2frSRG+t1bYgfk7qBkMYuQc=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=MulYlYirkI6QwlOPVvP0zj0zAR1P99IaFr92JeF9mRHJRdM8PbYjopBdLCYqJCeJ GoE40I1TyJKICLLT3AJtKTRfP+x6YcSz3vpRoT7OFlrS9Lql3yModydf3oRQ/dMdz MS7kYUWCKat8DnH8Rz55wqiUHDGKo5KWkiyW0MuMIJTK6H3jt+g2a4fC/0aSrN9MA qIGJAKGJW35tyDxgF/JIRykIIj99Wo1yu0q/rltI23bE58+cgLPB6RIJV1PDH+25i ghPXmGQP8A9A0m/yasE7xuGThZdm820nK6DzHD+qISoqHvG051zXxHe5gwJHOdG76 DuASI53yA7GG9E/wzw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.81.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M59nK-1rTHrY3FWW-001IKu; Mon, 29 Jan 2024 10:53:04 +0100 Message-ID: <3ca56d3f-5a2b-4321-adbb-4e2c0d72b573@web.de> Date: Mon, 29 Jan 2024 10:52:48 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [v2] platform/x86/amd/pmf: Fix memory leak in amd_pmf_get_pb_data() Content-Language: en-GB To: Hans de Goede , Cong Liu , Shyam Sundar S K , Mario Limonciello , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , platform-driver-x86@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: LKML References: <901291c8-ca9c-47b2-8321-256b314690da@redhat.com> <2b3b4754-4c20-48ef-9844-f5db6a7f527e@web.de> From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4BvwCS8lGjsVcbwXquWcqTMlULuUVkV7zZs9jcpaGdX/8hT9jj1 QbZZ0qctnLpc1msSNIhSobmAyN7AdkMqr3kpPFNTSAMfBN/N8j7KkRJuGRUgFqcws0LtGYx NPAFT1GMkmdf6IGvOF+sEs0HH5qkww7ajh+Q+a3/ebCXTI+Gdjn8tEMZ0Fx/ztoC63tsOZT RXCbeMDZmnEBLhzRlPhDQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:2RcZ5CezqYE=;72yBd+1QRh0XfBtOycVS5Uu75LT WVIziAJUe5Bd1HC4byJ1U8nvgFOxorN9sMx05Z+wYJOsw6MFv4kwjdaid6ICX/mjEjPk+GJsL 38GZVYpMH1p/oYfM926pRBMPwa2wGo/1Brz9r/bfjoo++bag1ZiRqCxhkfiPXo8KQBdmCdhgM arCdsPvJrjUaiYJv/7NTZZ9V38uOIRaljZFRXIbqThWY5geCEK3MyK5Co6oaCdFQJ0O7MXVGb rbSZ8Jyk6D0s8J5ddb7LPKr+iINYtR2xwlqaRWewxigCuhFiI7wew6JAbwYiavx36CIH6tcRv HKZS2yJ8etBwzGGPhEXZAHn2bB+7cV5MrH9kX07YdMJNYa/Soe70GbVrumfO9ezz6Fnez3W8l VDnwYPRbLD98rvWJS1jPKJJSNqZmbkJ4Au7yLbXDnQJLqr+FqJWe67vaOlhLGTRvYXqEz/MlQ q2j0NFdeWqOOnYJ19zZ6fdMk0vheWIV/TzemQqgT0SZMUUi+9JAU6L8ZbZ068T7kYx+B2gncg C1wj4IjRuCBaZuK/4qIuLAWhrK8onxNE1h/jF87jUT7D3rsUbi5KQ3WOjY7PBQhg/84KTIE5t 1X1vy1MmHwI3ida7nAOb6c1lGlt2pSWMW+Ff5Ko38vMa4HdGjyRHZjM7/nWYJIrcpIyddlalj Pb2SAqmhJiMMCqLyL2Nj8+9HHKH48SyP1tjBWCXv7scOuXE+3bP9E5OpB4F+OyWHWHIefkwbN 9pv5AsJyrQo4hlgpmDrlIleAbJfaoU51MOH5JfXqg7zNiB0ow1fxCTxszw+ALG4E29SKZdv2O 5/xpA5gu0prxR/zH0mwvWhH+BTpQBCDNNAJVUrnaN1/poTb+DmqUgHH+5JC6xUnZ9oKjicdBD 7sQUYjPvfyFRGY7pcxdcRHfukIn571Zg4NARTznBTXr84vQ/47u8wuvAW+GE1UXAogUNzD81O /VUfTQ== > If the question is: "Are patches generated by coccinelle welcome?" > then the answer is "Yes patches generated by coccinelle are very > much welcome". How do you think about to fix a questionable memory leak by using the function =E2=80=9Cmemdup_user=E2=80=9D instead? https://elixir.bootlin.com/linux/v6.8-rc1/source/mm/util.c#L185 Would you like to try a corresponding command out once more on source file= s of a software like =E2=80=9CLinux next-20240125=E2=80=9D? https://elixir.bootlin.com/linux/v6.8-rc1/source/scripts/coccinelle/api/me= mdup_user.cocci#L2 make COCCI=3Dscripts/coccinelle/api/memdup_user.cocci M=3Ddrivers/platform= /x86/amd/pmf/ MODE=3Dpatch coccicheck Regards, Markus