From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-37.mta0.migadu.com [91.218.175.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F79C446C19 for ; Tue, 25 Aug 2026 12:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787662096; cv=none; b=HujlG9bgpACaeH5R9I1MFiEFm+4Z9h7Gq4ersl9/Dj2eHz8hI6Jm00pBD0CiOepi2UELzMtC+XiNAQaXS1UKf+rjVat1YrfKvmvO1o6V0gw2+/ym1kKR7cmy4uzCn9kHDkoKVWd3l6RI/3f+5X3Slwu05S6gZCOMtfaOEojmztM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787662096; c=relaxed/simple; bh=xl1X/ERnfdb/Po0MH7kJ/YHraADcPjNCbK3IAQ+MWqs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MKCC2JladGiwSILpLtmpz3YBunWIZxMiXGBgWFszPj+k3mOVVD0fuhgTqYa5C3uuYjtEBjr56B5CVjzcmXBbLC17PBAGF7VKapqNV/sS8PKxMtyV3jMYe9/TW1jHbvx/PzZRdeaMnThWBVfAeqXCpiM+7tQm930Y6ZdKusxKCoY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vaLj+Fl7; arc=none smtp.client-ip=91.218.175.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vaLj+Fl7" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=xl1X/ERnfdb/Po0MH7kJ/YHraADcPjNCbK3IAQ+MWqs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787662085; v=1; x=1788266885; b=vaLj+Fl7HSE4h7MF2Yt3FmAOp19+eVa2mpUmlNxBEDVE6fVsPtxa/cET68m/VtOSw5joC2lQ MqTrP2e90lJdBAxcl3DHdqAO7Ko4h2chI+v3YOTGtwHIFl2POgITrvXQ+aM9JdA3yS/UYv578W1 PkLD84+SNRS/F9NSIWDsBhu4= X-Envelope-To: linux-kernel@vger.kernel.org Received: from [10.244.244.3] (2602:fce1:44f:115e::) by smtp.migadu.com with ESMTPS id 952ab7d5463f0b6b; Tue, 25 Aug 2026 12:48:05 +0000 X-Mizu-Trace-ID: 952ab7d5463f0b6b X-Migadu-Flow: FLOW_OUT Message-ID: Date: Tue, 25 Aug 2026 20:47:52 +0800 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: [PATCH] selftests/mm: khugepaged: remove str_dup() usage Content-Language: en-US To: "David Hildenbrand (Arm)" Cc: Mike Rapoport , Ryan Roberts , Lorenzo Stoakes , Zi Yan , linux-mm@kvack.org, Michal Hocko , Usama Arif , Dev Jain , Shuah Khan , Barry Song , "Liam R. Howlett" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan , Vlastimil Babka , Baolin Wang , Nico Pache , Andrew Morton References: <20260825-remove_str_dup-v1-1-0ba2121a820c@kernel.org> From: Lance Yang In-Reply-To: <20260825-remove_str_dup-v1-1-0ba2121a820c@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/8/25 19:20, David Hildenbrand (Arm) wrote: > We don't check str_dup() return value and never free it. While both > things are irrelevant in practice, let's just clean it up by working on > argv[0] directly and avoiding the str_dup(). > > Nobody after us needs these parts of the argv[0] string anyway. > > This patch is inspired by previous work from Anshuman Tewari [1]. > > Link: https://lore.kernel.org/r/20260821114416.12255-1-anshumantewari123@gmail.com [1] > Signed-off-by: David Hildenbrand (Arm) > --- Reviewed-by: Lance Yang