drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:77:2-8: preceding lock on line 73

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Han Gao <[email protected]>
CC: Alex Deucher <[email protected]>
CC: Felix Kuehling <[email protected]>

Hi Han,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d2c9a99135da931377240942d44f3dea104cedb8
commit: fa301127ba9a22f40b4261f569f1fc8b3d66e04e drm/amdkfd: enable kfd on LoongArch systems
date:   12 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 12 months ago
config: loongarch-randconfig-r062-20260703 (https://download.01.org/0day-ci/archive/20260703/[email protected]/config)
compiler: loongarch64-linux-gcc (GCC) 16.1.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
| Fixes: fa301127ba9a ("drm/amdkfd: enable kfd on LoongArch systems")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:77:2-8: preceding lock on line 73

vim +77 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

4a488a7ad714011 Oded Gabbay     2014-07-16  68  
9731dd4cadc5325 Daniel Phillips 2022-05-30  69  static inline struct kfd_process_device *kfd_lock_pdd_by_id(struct kfd_process *p, __u32 gpu_id)
9731dd4cadc5325 Daniel Phillips 2022-05-30  70  {
9731dd4cadc5325 Daniel Phillips 2022-05-30  71  	struct kfd_process_device *pdd;
9731dd4cadc5325 Daniel Phillips 2022-05-30  72  
9731dd4cadc5325 Daniel Phillips 2022-05-30 @73  	mutex_lock(&p->mutex);
9731dd4cadc5325 Daniel Phillips 2022-05-30  74  	pdd = kfd_process_device_data_by_id(p, gpu_id);
9731dd4cadc5325 Daniel Phillips 2022-05-30  75  
9731dd4cadc5325 Daniel Phillips 2022-05-30  76  	if (pdd)
9731dd4cadc5325 Daniel Phillips 2022-05-30 @77  		return pdd;
9731dd4cadc5325 Daniel Phillips 2022-05-30  78  
9731dd4cadc5325 Daniel Phillips 2022-05-30  79  	mutex_unlock(&p->mutex);
9731dd4cadc5325 Daniel Phillips 2022-05-30  80  	return NULL;
9731dd4cadc5325 Daniel Phillips 2022-05-30  81  }
9731dd4cadc5325 Daniel Phillips 2022-05-30  82  

:::::: The code at line 77 was first introduced by commit
:::::: 9731dd4cadc53251ef80b3655c8d841fed52fa3d drm/amdkfd: Add available memory ioctl

:::::: TO: Daniel Phillips <[email protected]>
:::::: CC: Alex Deucher <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.