mm-commits Archive on
 help / color / Atom feed
* [merged] mm-initialize-return-of-vm_insert_pages.patch removed from -mm tree
@ 2020-07-24 23:38 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-07-24 23:38 UTC (permalink / raw)
  To: mm-commits, trix

The patch titled
     Subject: mm: initialize return of vm_insert_pages
has been removed from the -mm tree.  Its filename was

This patch was dropped because it was merged into mainline or a subsystem tree

From: Tom Rix <>
Subject: mm: initialize return of vm_insert_pages

clang static analysis reports a garbage return

In file included from mm/memory.c:84:
mm/memory.c:1612:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn]
        return err;

The setting of err depends on a loop executing.
So initialize err.

Signed-off-by: Tom Rix <>
Signed-off-by: Andrew Morton <>

 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/memory.c~mm-initialize-return-of-vm_insert_pages
+++ a/mm/memory.c
@@ -1601,7 +1601,7 @@ int vm_insert_pages(struct vm_area_struc
 	return insert_pages(vma, addr, pages, num, vma->vm_page_prot);
 	unsigned long idx = 0, pgcount = *num;
-	int err;
+	int err = -EINVAL;
 	for (; idx < pgcount; ++idx) {
 		err = vm_insert_page(vma, addr + (PAGE_SIZE * idx), pages[idx]);

Patches currently in -mm which might be from are

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 23:38 [merged] mm-initialize-return-of-vm_insert_pages.patch removed from -mm tree akpm

mm-commits Archive on

Archives are clonable:
	git clone --mirror mm-commits/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 mm-commits mm-commits/ \
	public-inbox-index mm-commits

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone