linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Taehee Yoo <ap420073@gmail.com>
Cc: kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
	rafael@kernel.org, linux-fsdevel@vger.kernel.org,
	ap420073@gmail.com
Subject: Re: [PATCH] debugfs: Check module state before warning in {full/open}_proxy_open()
Date: Thu, 6 Feb 2020 09:39:09 +0800	[thread overview]
Message-ID: <202002060953.7V3nl6kD%lkp@intel.com> (raw)
In-Reply-To: <20200205122724.1307-1-ap420073@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3371 bytes --]

Hi Taehee,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on v5.5 next-20200204]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Taehee-Yoo/debugfs-Check-module-state-before-warning-in-full-open-_proxy_open/20200206-045726
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 6992ca0dd017ebaa2bf8e9dcc49f1c3b7033b082
config: arm-mps2_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/debugfs/file.c: In function 'open_proxy_open':
>> fs/debugfs/file.c:180:23: error: dereferencing pointer to incomplete type 'struct module'
          real_fops->owner->state == MODULE_STATE_GOING)
                          ^~
>> fs/debugfs/file.c:180:34: error: 'MODULE_STATE_GOING' undeclared (first use in this function); did you mean 'DL_STATE_NONE'?
          real_fops->owner->state == MODULE_STATE_GOING)
                                     ^~~~~~~~~~~~~~~~~~
                                     DL_STATE_NONE
   fs/debugfs/file.c:180:34: note: each undeclared identifier is reported only once for each function it appears in
   fs/debugfs/file.c: In function 'full_proxy_open':
   fs/debugfs/file.c:313:34: error: 'MODULE_STATE_GOING' undeclared (first use in this function); did you mean 'DL_STATE_NONE'?
          real_fops->owner->state == MODULE_STATE_GOING)
                                     ^~~~~~~~~~~~~~~~~~
                                     DL_STATE_NONE

vim +180 fs/debugfs/file.c

   161	
   162	static int open_proxy_open(struct inode *inode, struct file *filp)
   163	{
   164		struct dentry *dentry = F_DENTRY(filp);
   165		const struct file_operations *real_fops = NULL;
   166		int r;
   167	
   168		r = debugfs_file_get(dentry);
   169		if (r)
   170			return r == -EIO ? -ENOENT : r;
   171	
   172		real_fops = debugfs_real_fops(filp);
   173	
   174		r = debugfs_locked_down(inode, filp, real_fops);
   175		if (r)
   176			goto out;
   177	
   178		if (!fops_get(real_fops)) {
   179			if (real_fops->owner &&
 > 180			    real_fops->owner->state == MODULE_STATE_GOING)
   181				goto out;
   182	
   183			/* Huh? Module did not clean up after itself at exit? */
   184			WARN(1, "debugfs file owner did not clean up at exit: %pd",
   185				dentry);
   186			r = -ENXIO;
   187			goto out;
   188		}
   189		replace_fops(filp, real_fops);
   190	
   191		if (real_fops->open)
   192			r = real_fops->open(inode, filp);
   193	
   194	out:
   195		debugfs_file_put(dentry);
   196		return r;
   197	}
   198	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9518 bytes --]

      reply	other threads:[~2020-02-06  1:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 12:27 [PATCH] debugfs: Check module state before warning in {full/open}_proxy_open() Taehee Yoo
2020-02-06  1:39 ` kbuild test robot [this message]

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=202002060953.7V3nl6kD%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ap420073@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).