All the mail mirrored from 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, Julia Lawall <julia.lawall@inria.fr>
Subject: [linux-next:master 2674/3921] mm/vmalloc.c:1079:3-9: preceding lock on line 1075
Date: Fri, 5 Apr 2024 04:15:36 +0800	[thread overview]
Message-ID: <202404050445.yVFqmYIK-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2b3d5988ae2cb5cd945ddbc653f0a71706231fdd
commit: 936eedaeacdee6663fa552fc650df4cd4d75d3e4 [2674/3921] mm: vmalloc: fix lockdep warning
:::::: branch date: 17 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-104-20240405 (https://download.01.org/0day-ci/archive/20240405/202404050445.yVFqmYIK-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.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: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202404050445.yVFqmYIK-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> mm/vmalloc.c:1079:3-9: preceding lock on line 1075

vim +1079 mm/vmalloc.c

f181234a5a21fd Chen Wandun             2021-09-02  1038  
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1039) /*
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1040)  * Returns a node where a first VA, that satisfies addr < va_end, resides.
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1041)  * If success, a node is locked. A user is responsible to unlock it when a
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1042)  * VA is no longer needed to be accessed.
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1043)  *
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1044)  * Returns NULL if nothing found.
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1045)  */
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1046) static struct vmap_node *
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1047) find_vmap_area_exceed_addr_lock(unsigned long addr, struct vmap_area **va)
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1048) {
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1049) 	unsigned long va_start_lowest;
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1050) 	struct vmap_node *vn;
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1051) 	int i;
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1052) 
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1053) repeat:
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1054) 	for (i = 0, va_start_lowest = 0; i < nr_vmap_nodes; i++) {
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1055) 		vn = &vmap_nodes[i];
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1056) 
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1057) 		spin_lock(&vn->busy.lock);
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1058) 		*va = __find_vmap_area_exceed_addr(addr, &vn->busy.root);
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1059) 
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1060) 		if (*va)
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1061) 			if (!va_start_lowest || (*va)->va_start < va_start_lowest)
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1062) 				va_start_lowest = (*va)->va_start;
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1063) 		spin_unlock(&vn->busy.lock);
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1064) 	}
53becf32aec1c8 Uladzislau Rezki (Sony  2024-01-02  1065) 
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1066) 	/*
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1067) 	 * Check if found VA exists, it might it is gone away.
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1068) 	 * In this case we repeat the search because a VA has
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1069) 	 * been removed concurrently thus we need to proceed
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1070) 	 * with next one what is a rare case.
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1071) 	 */
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1072) 	if (va_start_lowest) {
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1073) 		vn = addr_to_node(va_start_lowest);
db64fe02258f15 Nicholas Piggin         2008-10-18  1074  
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28 @1075) 		spin_lock(&vn->busy.lock);
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1076) 		*va = __find_vmap_area(va_start_lowest, &vn->busy.root);
4aff1dc4fb3a5a Andrey Konovalov        2022-03-24  1077  
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1078) 		if (*va)
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28 @1079) 			return vn;
db64fe02258f15 Nicholas Piggin         2008-10-18  1080  
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1081) 		spin_unlock(&vn->busy.lock);
936eedaeacdee6 Uladzislau Rezki (Sony  2024-03-28  1082) 		goto repeat;
db64fe02258f15 Nicholas Piggin         2008-10-18  1083  	}
db64fe02258f15 Nicholas Piggin         2008-10-18  1084  
db64fe02258f15 Nicholas Piggin         2008-10-18  1085  	return NULL;
db64fe02258f15 Nicholas Piggin         2008-10-18  1086  }
db64fe02258f15 Nicholas Piggin         2008-10-18  1087  

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

                 reply	other threads:[~2024-04-04 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202404050445.yVFqmYIK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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.