lkml.org 
[lkml]   [1998]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.047 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site