From: kernel test robot <lkp@intel.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Jens Axboe <axboe@kernel.dk>,
linux-block <linux-block@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Bart Van Assche <bvanassche@acm.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Ming Lei <tom.leiming@gmail.com>,
Damien Le Moal <dlemoal@kernel.org>,
Christoph Hellwig <hch@lst.de>, Qu Wenruo <wqu@suse.com>,
Hillf Danton <hdanton@sina.com>
Subject: Re: [PATCH] loop: reject binding to procfs and sysfs files
Date: Sun, 31 May 2026 03:48:44 +0800 [thread overview]
Message-ID: <202605310318.dbidMe6W-lkp@intel.com> (raw)
In-Reply-To: <148efba2-a0b6-47d7-ac76-b19d2f4b696c@I-love.SAKURA.ne.jp>
Hi Tetsuo,
kernel test robot noticed the following build errors:
[auto build test ERROR on axboe/for-next]
[also build test ERROR on linus/master v7.1-rc5 next-20260529]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Tetsuo-Handa/loop-reject-binding-to-procfs-and-sysfs-files/20260530-214900
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link: https://lore.kernel.org/r/148efba2-a0b6-47d7-ac76-b19d2f4b696c%40I-love.SAKURA.ne.jp
patch subject: [PATCH] loop: reject binding to procfs and sysfs files
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20260531/202605310318.dbidMe6W-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 9409c07de6378507397ecdb6f05f628f58110112)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260531/202605310318.dbidMe6W-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605310318.dbidMe6W-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/block/loop.c:504:7: error: use of undeclared identifier 'PROC_SUPER_MAGIC'
504 | case PROC_SUPER_MAGIC: /* e.g. "losetup -f /proc/sys/kernel/version" */
| ^~~~~~~~~~~~~~~~
>> drivers/block/loop.c:505:7: error: use of undeclared identifier 'SYSFS_MAGIC'
505 | case SYSFS_MAGIC: /* e.g. "losetup -f /sys/power/state" */
| ^~~~~~~~~~~
2 errors generated.
vim +/PROC_SUPER_MAGIC +504 drivers/block/loop.c
478
479 static int loop_validate_file(struct file *file, struct block_device *bdev)
480 {
481 struct inode *inode = file->f_mapping->host;
482 struct file *f = file;
483
484 /* Avoid recursion */
485 while (is_loop_device(f)) {
486 struct loop_device *l;
487
488 lockdep_assert_held(&loop_validate_mutex);
489 if (f->f_mapping->host->i_rdev == bdev->bd_dev)
490 return -EBADF;
491
492 l = I_BDEV(f->f_mapping->host)->bd_disk->private_data;
493 if (l->lo_state != Lo_bound)
494 return -EINVAL;
495 /* Order wrt setting lo->lo_backing_file in loop_configure(). */
496 rmb();
497 f = l->lo_backing_file;
498 }
499 if (S_ISBLK(inode->i_mode))
500 return 0;
501 if (!S_ISREG(inode->i_mode))
502 return -EINVAL;
503 switch (inode->i_sb->s_magic) {
> 504 case PROC_SUPER_MAGIC: /* e.g. "losetup -f /proc/sys/kernel/version" */
> 505 case SYSFS_MAGIC: /* e.g. "losetup -f /sys/power/state" */
506 return -EINVAL;
507 }
508 return 0;
509 }
510
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-05-30 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 13:48 [PATCH] loop: reject binding to procfs and sysfs files Tetsuo Handa
2026-05-30 19:48 ` kernel test robot [this message]
2026-05-30 20:45 ` kernel test robot
2026-06-01 7:10 ` Christoph Hellwig
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=202605310318.dbidMe6W-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=hdanton@sina.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=tom.leiming@gmail.com \
--cc=wqu@suse.com \
/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.