[openib-general] Re: [PATCH][uverbs] use get_task_mm

Michael S. Tsirkin mst at mellanox.co.il
Mon Feb 28 11:55:01 PST 2005


Quoting r. Roland Dreier <roland at topspin.com>:
> Subject: Re: [PATCH][uverbs] use get_task_mm
> 
>     Roland> I guess this patch can't hurt but can the mm really go
>     Roland> away?  The only time we will call ib_umem_get() is during
>     Roland> a write system call (which requires an open file,
>     Roland> obviously).  Can current->mm go away before all files are
>     Roland> closed?
> 
> I didn't phrase this precisely as I meant.  Can current->mm go away
> during a system call for current's task?
> 
>  - R.

But you are right : it cant - although
the files are closed *after* the mm is destroyed, I think its safe to
use current->mm in most sys calls (well, except sys_exit and such I
guess) as long as you dont store this pointer in some data structure
which may survive after the syscall returns.

That patch seemed to help for a bit (still crashing, but in a different
place) with the crashes I reported earlier, but I guess it must have
triggered off some other problem.

-- 
MST - Michael S. Tsirkin



More information about the general mailing list