[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48937084.8020200@goop.org>
Date: Fri, 01 Aug 2008 13:22:28 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Hugh Dickins <hugh@...itas.com>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
David Miller <davem@...emloft.net>, mingo@...e.hu,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] lockdep: lock_set_subclass - reset a held lock's subclass
Hugh Dickins wrote:
> Please check the spin_lock_nested() in move_ptes() in mm/mremap.c.
>
> If you have down_write(&mm->mmap_sem) then you should be safe,
> but may need to do something to placate lockdep. If you don't
> have down_write(&mm->mmap_sem), then I think you're in trouble?
>
> Not a big deal, the move_ptes() locking can be adjusted to suit
> your rule, it was just easier to do it the way it is at the time.
Ah, yes, I did look at that. I think it isn't an issue, because my code
is called from dup_mmap(), activate_mm() or exit_mmap().
dup_mmap() already holds mmap_sem.
activate_mm() in exec doesn't hold the sem, but I don't think it's
possible for anyone to be racing against it.
activate_mm() in unshare doesn't seem to get used.
exit_mmap() gets called when there are no other users, so we'd better
not be racing...
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists