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@xxxxxxxxx> 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@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip