[PATCH 07/12] zloop: take freeze protection when recording write pointers

Christoph Hellwig hch at lst.de
Fri Nov 20 07:44:09 PST 2026


On Mon, Nov 16, 2026 at 12:57:09PM +0100, Jan Kara wrote:
> On Mon 16-11-26 10:41:49, Christian Brauner wrote:
> > Fwiw, the check can't go into __vfs_setxattr(), __vfs_setxattr_noperm()
> > or __vfs_removexattr(). cap_inode_killpriv(), IMA and EVM call those
> > from ->write_iter() via file_remove_privs() and kiocb_start_write()
> > hides the freeze protection from lockdep for aio and io_uring. I have
> > not bothered to figure out why. Maybe you already know? In any case,
> > until that's fixed we can't place it there which means this doesn't
> > catch IMA/EVM at which point this patch becomes pointless.
> 
> It's because of AIO and io_uring - if you don't hide the protection from
> lockdep, it will complain about it when returning to userspace while IO is
> still in flight (and thus protection is held). Sadly lockdep does not
> support releasing resources by anybody else than the process which acquired
> it so we fool it in this way...

Can we try to escalate this to the lockdep folks instead of piling hacks
deeper and deeper?
> 
> 								Honza
> -- 
> Jan Kara <jack at suse.com>
> SUSE Labs, CR
---end quoted text---



More information about the Linux-nvme mailing list