All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [RFC PATCH 1/3] mm: introduce new .mmap_proto() f_op callback
Date: Mon, 5 May 2025 23:59:59 +0800	[thread overview]
Message-ID: <202505052353.V1RLZ4v9-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <f1bf4b452cc10281ef831c5e38ce16f09923f8c5.1746040540.git.lorenzo.stoakes@oracle.com>
References: <f1bf4b452cc10281ef831c5e38ce16f09923f8c5.1746040540.git.lorenzo.stoakes@oracle.com>
TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>

Hi Lorenzo,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on next-20250505]
[cannot apply to brauner-vfs/vfs.all linus/master v6.15-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Stoakes/mm-introduce-new-mmap_proto-f_op-callback/20250501-035712
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/f1bf4b452cc10281ef831c5e38ce16f09923f8c5.1746040540.git.lorenzo.stoakes%40oracle.com
patch subject: [RFC PATCH 1/3] mm: introduce new .mmap_proto() f_op callback
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-161-20250505 (https://download.01.org/0day-ci/archive/20250505/202505052353.V1RLZ4v9-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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 <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505052353.V1RLZ4v9-lkp@intel.com/

smatch warnings:
mm/vma.c:2642 __mmap_region() error: we previously assumed 'vma' could be null (see line 2635)

vim +/vma +2642 mm/vma.c

d5b6d999086329 Lorenzo Stoakes 2025-04-30  2609  
f8d4a6cabb74f8 Lorenzo Stoakes 2025-01-02  2610  static unsigned long __mmap_region(struct file *file, unsigned long addr,
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2611  		unsigned long len, vm_flags_t vm_flags, unsigned long pgoff,
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2612  		struct list_head *uf)
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2613  {
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2614  	struct mm_struct *mm = current->mm;
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2615  	struct vm_area_struct *vma = NULL;
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2616  	int error;
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2617  	VMA_ITERATOR(vmi, mm, addr);
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2618  	MMAP_STATE(map, mm, &vmi, addr, len, pgoff, vm_flags, file);
d5b6d999086329 Lorenzo Stoakes 2025-04-30  2619  	bool have_proto = have_mmap_proto_hook(&map);
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2620  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2621  	error = __mmap_prepare(&map, uf);
d5b6d999086329 Lorenzo Stoakes 2025-04-30  2622  	if (!error && have_proto)
d5b6d999086329 Lorenzo Stoakes 2025-04-30  2623  		error = call_proto(&map);
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2624  	if (error)
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2625  		goto abort_munmap;
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2626  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2627  	/* Attempt to merge with adjacent VMAs... */
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2628  	if (map.prev || map.next) {
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2629  		VMG_MMAP_STATE(vmg, &map, /* vma = */ NULL);
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2630  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2631  		vma = vma_merge_new_range(&vmg);
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2632  	}
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2633  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2634  	/* ...but if we can't, allocate a new VMA. */
0d11630cc50a62 Lorenzo Stoakes 2024-10-25 @2635  	if (!vma) {
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2636  		error = __mmap_new_vma(&map, &vma);
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2637  		if (error)
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2638  			goto unacct_error;
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2639  	}
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2640  
d5b6d999086329 Lorenzo Stoakes 2025-04-30  2641  	if (have_proto)
d5b6d999086329 Lorenzo Stoakes 2025-04-30 @2642  		set_vma_user_defined_fields(vma, &map);
d5b6d999086329 Lorenzo Stoakes 2025-04-30  2643  
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2644  	/* If flags changed, we might be able to merge, so try again. */
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2645  	if (map.retry_merge) {
42c4e4b20d9c46 Lorenzo Stoakes 2024-12-06  2646  		struct vm_area_struct *merged;
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2647  		VMG_MMAP_STATE(vmg, &map, vma);
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2648  
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2649  		vma_iter_config(map.vmi, map.addr, map.end);
42c4e4b20d9c46 Lorenzo Stoakes 2024-12-06  2650  		merged = vma_merge_existing_range(&vmg);
42c4e4b20d9c46 Lorenzo Stoakes 2024-12-06  2651  		if (merged)
42c4e4b20d9c46 Lorenzo Stoakes 2024-12-06  2652  			vma = merged;
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2653  	}
5ac87a885aecb3 Lorenzo Stoakes 2024-10-25  2654  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2655  	__mmap_complete(&map, vma);
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2656  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2657  	return addr;
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2658  
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2659  	/* Accounting was done by __mmap_prepare(). */
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2660  unacct_error:
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2661  	if (map.charged)
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2662  		vm_unacct_memory(map.charged);
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2663  abort_munmap:
0d11630cc50a62 Lorenzo Stoakes 2024-10-25  2664  	vms_abort_munmap_vmas(&map.vms, &map.mas_detach);
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2665  	return error;
52956b0d7fb92e Lorenzo Stoakes 2024-10-25  2666  }
7d344babac9984 Lorenzo Stoakes 2024-12-03  2667  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-05-05 16:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 15:59 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-30 19:54 [RFC PATCH 0/3] eliminate mmap() retry merge, add .mmap_proto hook Lorenzo Stoakes
2025-04-30 19:54 ` [RFC PATCH 1/3] mm: introduce new .mmap_proto() f_op callback Lorenzo Stoakes
2025-04-30 19:59   ` Lorenzo Stoakes
2025-04-30 21:44   ` Jann Horn
2025-05-01 10:37     ` Lorenzo Stoakes
2025-04-30 21:58   ` David Hildenbrand
2025-05-01 10:23     ` Lorenzo Stoakes
2025-05-01 12:17       ` Mike Rapoport
2025-05-01 13:00         ` Lorenzo Stoakes
2025-05-01 13:51     ` Liam R. Howlett
2025-05-01 13:57       ` Lorenzo Stoakes
2025-05-05 13:29     ` Christian Brauner
2025-05-06 10:01       ` Lorenzo Stoakes

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=202505052353.V1RLZ4v9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.