* [RFC] hpfs_unlink() deadlock
@ 2016-02-24 0:37 Al Viro
2016-02-24 20:29 ` Mikulas Patocka
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2016-02-24 0:37 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: Linus Torvalds, linux-fsdevel
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...
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] hpfs_unlink() deadlock
2016-02-24 0:37 [RFC] hpfs_unlink() deadlock Al Viro
@ 2016-02-24 20:29 ` Mikulas Patocka
0 siblings, 0 replies; 2+ messages in thread
From: Mikulas Patocka @ 2016-02-24 20:29 UTC (permalink / raw)
To: Al Viro; +Cc: Mikulas Patocka, Linus Torvalds, linux-fsdevel
On Wed, 24 Feb 2016, Al Viro wrote:
> 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...
Yes, I think it's better to just fail instead of truncating the file.
Mikulas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-24 20:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 0:37 [RFC] hpfs_unlink() deadlock Al Viro
2016-02-24 20:29 ` Mikulas Patocka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).