Messages in this thread | | | Date | Wed, 23 Dec 1998 20:55:16 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: if my new update_shared_mappings() races, vmtruncate is just racing , too |
| |
On Wed, 23 Dec 1998, Linus Torvalds wrote:
> hard: I couldn't do it without some really obvious deadlock issues, and I > suspect it needs some serious designing to get right.
Agreed.
> so. It's not a good rule, but it at least doesn't deadlock.
I am happy that it seems I have understood the code right ;) and I finished thinking your same thing.
I tried to not base the thread safety of update_shared_mappings() on lock_kernel() but I can' t do that because I was always going to deadlock in down() some way...
The first ostacle is that to get the vma with find_vma() (I need the vma to know which other shared mappings are in the game) I need the mmap_sem semaphore held and so I am forced to down() on the mmap_sem of the current process as first thing so I can' t do an ordered down() to avoid deadlocking...
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |