hpfs_unlink() deadlock
Al Viro
maintainer Since "HPFS: Introduce a global mutex and lock it on every callback
from VFS" we had a deadlock in the "can't delete directory entry due to lack of space, try to truncate the sucker first" path - hpfs_lock() held through the area that contains notify_change() and hpfs_setattr() grabs it again. BKL != mutex...
We could try to deal with that, but really, why not simply fail with-ENOSPC there? It still can happen, even after truncate, so it's not as if the userland didn't have to cope with it. And doing that would eliminate the last user of dentry_unhash(), allowing to kill that crap as well...
Quoted 10 lines · Al Viro
Since "HPFS: Introduce a global mutex and lock it on every callback
from VFS" we had a deadlock in the "can't delete directory entry due to lack of space, try to truncate the sucker first" path -hpfs_lock()held through the area that containsnotify_change()andhpfs_setattr()grabs it again. BKL != mutex...We could try to deal with that, but really, why not simply fail with
-ENOSPCthere? It still can happen, even after truncate, so it's not as if the userland didn't have to cope with it. And doing that would eliminate the last user ofdentry_unhash(), allowing to kill that crap as well...
Yes, I think it's better to just fail instead of truncating the file.
Mikulas