linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	oe-kbuild@lists.linux.dev,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Jason Gunthorpe <jgg@nvidia.com>
Subject: Re: kernel/liveupdate/kexec_handover.c:994 kho_preserve_vmalloc() warn: missing error code 'err'
Date: Thu, 22 Jan 2026 11:49:13 +0200	[thread overview]
Message-ID: <aXHymXWEXY4Bia9C@kernel.org> (raw)
In-Reply-To: <20260121123922.c0bb0ef8505c70b99998c324@linux-foundation.org>

On Wed, Jan 21, 2026 at 12:39:22PM -0800, Andrew Morton wrote:
> On Wed, 21 Jan 2026 11:58:20 +0300 Dan Carpenter <dan.carpenter@linaro.org> wrote:
> 
> > Hi Pasha,
> > 
> > First bad commit (maybe != root cause):
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   6c790212c588fddeb0d852f2790840753bb604b1
> > commit: 48a1b2321d763b5edeaf20bd4576d8c4b5df772b liveupdate: kho: move to kernel/liveupdate
> > config: x86_64-randconfig-r071-20260121 (https://download.01.org/0day-ci/archive/20260121/202601211636.IRaejjdw-lkp@intel.com/config)
> > compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> > rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> > smatch version: v0.5.0-8985-g2614ff1a
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > | Closes: https://lore.kernel.org/r/202601211636.IRaejjdw-lkp@intel.com/
> > 
> > smatch warnings:
> > kernel/liveupdate/kexec_handover.c:994 kho_preserve_vmalloc() warn: missing error code 'err'
> 
> Indeed, thanks.
> 
> 
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: kho: kho_preserve_vmalloc(): don't return 0 when ENOMEM
> Date: Wed Jan 21 12:36:17 PM PST 2026
> 
> kho_preserve_vmalloc() should return -ENOMEM when new_vmalloc_chunk()
> fails.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/r/202601211636.IRaejjdw-lkp@intel.com/
> Cc: Alexander Graf <graf@amazon.com>
> Cc: Jason Gunthorpe <jgg@nvidia.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
> Cc: Pratyush Yadav <pratyush@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

Thanks!

> ---
> 
>  kernel/liveupdate/kexec_handover.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> --- a/kernel/liveupdate/kexec_handover.c~a
> +++ a/kernel/liveupdate/kexec_handover.c
> @@ -1011,8 +1011,10 @@ int kho_preserve_vmalloc(void *ptr, stru
>  		chunk->phys[idx++] = phys;
>  		if (idx == ARRAY_SIZE(chunk->phys)) {
>  			chunk = new_vmalloc_chunk(chunk);
> -			if (!chunk)
> +			if (!chunk) {
> +				err = -ENOMEM;
>  				goto err_free;
> +			}
>  			idx = 0;
>  		}
>  	}
> _
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2026-01-22  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  8:58 Dan Carpenter
2026-01-21 20:39 ` Andrew Morton
2026-01-22  9:49   ` Mike Rapoport [this message]
2026-01-22 10:30   ` Pratyush Yadav
2026-01-22 18:14   ` Pasha Tatashin
2026-01-22 18:42     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aXHymXWEXY4Bia9C@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.carpenter@linaro.org \
    --cc=jgg@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=pasha.tatashin@soleen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox