Hi Balbir, Could you send out the latest version of your patch? I suspect it's changed a bit based on on this review and it would be good to make sure we're both on the same page. On Fri, Mar 28, 2008 at 11:10 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:Why would you want to overwrite mm->owner for any of the threads? If they're sharing an existing mm, then that mm must already have an owner, so no need to update it. A couple of issues with that: - I'm not sure how that handles the exec case - assume two users; the owner exits and wants to pass the ownership to the other user. It finds it, but sees that it's PF_EXITING. What should it do? If it waits for that other user to exit, it could take a long time (e.g. core dumps can take many seconds). If it exits immediately, then it will leave mm->owner pointing to an invalid task. If it passes ownership to the other task, it might pass it after the other task had done its mm_update_next_owner() check, which would be too late. - assume three users; the owner exits and wants to pass the ownership to one of the other two users. it searches through the candidates and finds one of the other users, which is in PF_EXITING, so it skips it. Just after this it sees that the user count has fallen to two users. How does it know whether the user that dropped the count was the PF_EXITING process that it saw previously (in which case it should keep searching) or the third user that it's not encountered yet (in which case it's not going to find the other user anywhere in its search). How about the following sequence: A is old owner, B is new owner A gets to the task_unlock() in exit_mm(): A->mm is now NULL, mm->owner == A B starts to execve() A calls mm_update_next_owner() B gets to the "active_mm = tsk->active_mm" in exec_mmap() A finds that B->mm == mm B continues through the critical section, gets past the point where it needs to check for ownership A sets mm->owner = B B finishes its exec, and carries on with its new mmap Yes, but once we've set mm->owner to the other task and released its task_lock, the new owner is responsible for handing off the mm to yet another owner if necessary. We're not protecting mm->owner - we're protecting new_owner->mm Paul --
| Lee Revell | Re: [RFC][PATCH] cpuidle: avoid singing capacitors |
| Ingo Molnar | [bug] latest -git boot hang |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Christoph Hellwig | Re: 2.6.24-rc6-mm1 |
git: | |
| Imran M Yousuf | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Dan Zwell | [PATCH] Color support added to git-add--interactive. |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Petr Vandrovec | Re: Fwd: [OT] Re: Git via a proxy server? |
| Lars Hansson | Re: Code signing in OpenBSD |
| Richard Stallman | Real men don't attack straw men |
| Pau | acer aspire one dmesg? |
| Henning Brauer | Re: About Xen: maybe a reiterative question but .. |
| Jarek Poplawski | Re: loaded router, excessive getnstimeofday in oprofile |
| Julius Volz | [PATCH RFC 20/24] IPVS: Add validity checks when adding/editing v6 services |
| Bruno | [PATCH 1/2] r8169: WoL fixes |
| Corey Hickey | [PATCH 01/10] Preparatory refactoring part 1. |
