From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EF90C246781 for ; Tue, 16 Dec 2025 19:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765912301; cv=none; b=JIs9ylBU/2Q2ONU5aiE136uoU2qxOck7jjrWQTKJGuiMFwAk/c6+rcaWTScIMHhKFA+eyzGEEmsSOQoy55Hb5PrrnFujh/Y+nOfwZvN05mbDDIm6jtNcvfuCv+QsC0v5f1FqcEvDjtTYaHk2puqk2HUVI91gw+2Wvcc1AQ6kpM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765912301; c=relaxed/simple; bh=3EfwQTvQ9hgppKvFI90kmFfFXDj1wdTizQaXlXrRod8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=lpR/2RtTcWVZXasoLV+78gfUz4ws8QEQh0ZQm4RDgldmt4J3fsRoLFNjRdtsp2ZxNxpkLC43unwvgen+vqwSZ5qpz7cFyNetn8qryzDWo4cCprYxRqBhr+CDaUeinCzTJhc4itdoLYCetSkWHkFvuM5pRZnYLw7en01s4CUQQoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=oMlXv+Bf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="oMlXv+Bf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36CB1C4CEF1; Tue, 16 Dec 2025 19:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1765912300; bh=3EfwQTvQ9hgppKvFI90kmFfFXDj1wdTizQaXlXrRod8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oMlXv+BfzQ9UVwGw21x9uHE/w7D0ym4ijKiQc226SZECPl1nxIFajYAatERgrdF9F wIn31Yqd/QJqZW7WBnFcrz/dsavvCaBmwi/hsLcNLpPsjhNaPvt4siOw7RtQhZI/hX 5HkinaOLiG4YwVC8Y9XjcPAmR06SAg1KAautkKY0= Date: Tue, 16 Dec 2025 11:11:39 -0800 From: Andrew Morton To: Qiang Ma Cc: bhe@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kexec: Replace the goto out_unlock with out Message-Id: <20251216111139.9a96dcbde829bf5d667ff50e@linux-foundation.org> In-Reply-To: <20251216075518.1626114-1-maqianga@uniontech.com> References: <20251216075518.1626114-1-maqianga@uniontech.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 16 Dec 2025 15:55:18 +0800 Qiang Ma wrote: > The image is initialized to NULL. Then, after calling kimage_alloc_init, > we can directly goto 'out' because at this time, the kimage_free will > determine whether image is a NULL pointer. > > This will prepare for the subsequent patch to reset the variable in > kimage_free. There doesn't seem to be a benefit to applying this patch unless the "subsequent patch" is also applied. So wouldn't a two-patch series be more appropriate?