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, Julia Lawall <julia.lawall@inria.fr>
Subject: fs/proc/inode.c:548:3-9: preceding lock on line 544
Date: Sat, 4 Jan 2025 06:11:05 +0800	[thread overview]
Message-ID: <202501040635.fW7PRJRt-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Alexey Dobriyan <adobriyan@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/torvalds/linux.git master
head:   0bc21e701a6ffacfdde7f04f87d664d82e8a13bf
commit: 13309764720624caf2c5afba99b198f3f9fcd9f0 proc: use __auto_type more
date:   4 months ago
:::::: branch date: 27 hours ago
:::::: commit date: 4 months ago
config: hexagon-randconfig-r054-20250102 (https://download.01.org/0day-ci/archive/20250104/202501040635.fW7PRJRt-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project ed572f2003275da8e06a634b4d6658b7921e8334)

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/202501040635.fW7PRJRt-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/proc/inode.c:548:3-9: preceding lock on line 544

vim +548 fs/proc/inode.c

786d7e1612f0b0 Alexey Dobriyan 2007-07-15  530  
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  531  static int proc_reg_release(struct inode *inode, struct file *file)
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  532  {
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  533  	struct proc_dir_entry *pde = PDE(inode);
881adb85358309 Alexey Dobriyan 2008-07-25  534  	struct pde_opener *pdeo;
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  535  
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  536  	if (pde_is_permanent(pde)) {
13309764720624 Alexey Dobriyan 2024-09-08  537  		__auto_type release = pde->proc_ops->proc_release;
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  538  		if (release) {
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  539  			return release(inode, file);
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  540  		}
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  541  		return 0;
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  542  	}
d919b33dafb3e2 Alexey Dobriyan 2020-04-06  543  
786d7e1612f0b0 Alexey Dobriyan 2007-07-15 @544  	spin_lock(&pde->pde_unload_lock);
ca469f35a8e9ef Al Viro         2013-04-03  545  	list_for_each_entry(pdeo, &pde->pde_openers, lh) {
ca469f35a8e9ef Al Viro         2013-04-03  546  		if (pdeo->file == file) {
ca469f35a8e9ef Al Viro         2013-04-03  547  			close_pdeo(pde, pdeo);
2f8974243507d9 Alexey Dobriyan 2018-04-10 @548  			return 0;
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  549  		}
881adb85358309 Alexey Dobriyan 2008-07-25  550  	}
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  551  	spin_unlock(&pde->pde_unload_lock);
ca469f35a8e9ef Al Viro         2013-04-03  552  	return 0;
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  553  }
786d7e1612f0b0 Alexey Dobriyan 2007-07-15  554  

:::::: The code at line 548 was first introduced by commit
:::::: 2f8974243507d9e5b0f214d7668a59a66b93f36c proc: do less stuff under ->pde_unload_lock

:::::: TO: Alexey Dobriyan <adobriyan@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

                 reply	other threads:[~2025-01-03 22:11 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=202501040635.fW7PRJRt-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.