On Thu, Apr 24, 2025 at 11:04:44AM +0200, Christoph Hellwig wrote: > On Thu, Apr 24, 2025 at 10:59:44AM +0200, Christian Brauner wrote: > > This reverts commit 777d0961ff95b26d5887fdae69900374364976f3. > > > > Now that we have fixed the original issue in devtmpfs we can revert this > > commit because the bdev_statx() call in vfs_getattr_nosec() causes > > issues with the lifetime logic of dm devices. > > Umm, no. We need this patch. And the devtmpfs fixes the issue that > it caused for devtmpfs. For loop devices only afaict. The bdev_statx() implementation is absolutely terrifying because it triggers all that block module autoloading stuff and quite a few kernels still have that turned on. By adding that to vfs_getattr_nosec() suddenly all kernel consumers are able to do the same thing by accident. This already crapped devtmpfs. We have no idea what else it will start breaking unless you audit every single caller. If this stays in then please figure out how to skip a call into blkdev_get_no_open() unless it's explicitly requested. I don't care if we have to add an in-kernel only request flag. We have one already anyway.