Re: Update shared mappings

Stephen C. Tweedie
1998-12-02T16:22:36Z

Hi,

On Tue, 1 Dec 1998 18:48:44 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:

> No deadlock at all. Are you sure you are using my _latest_ patch in
> arca-39? Some weeks ago I fixed this:

> if (shared->vm_mm == this->vm_mm)
> ^^^^^ ^^^^^

Ah right, I was working from the version Zlatko posted here a week or so
ago. This fix will indeed prevent the instant deadlock.

However, it is still susceptible to deadlock, because in msync() you
now hold the current mm semaphore while trying to take out somebody
else's mm semaphore. If you have two processes doing that to each other
(ie. two processes mapping the same file r/w and doing msyncs), then you
can most certainly still deadlock.

--Stephen