lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180503181235.GB4473@mtr-leonro.local>
Date:   Thu, 3 May 2018 21:12:35 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     Lidong Chen <jemmy858585@...il.com>, dledford@...hat.com,
        akpm@...ux-foundation.org, qing.huang@...cle.com,
        artemyko@...lanox.com, dan.j.williams@...el.com,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        adido@...lanox.com, galsha@...lanox.com, aviadye@...lanox.com,
        Lidong Chen <lidongchen@...cent.com>
Subject: Re: [PATCH] IB/umem: use tgid instead of pid in ib_umem structure

On Thu, May 03, 2018 at 09:33:10AM -0600, Jason Gunthorpe wrote:
> On Thu, May 03, 2018 at 10:04:34PM +0800, Lidong Chen wrote:
> > The userspace may invoke ibv_reg_mr and ibv_dereg_mr by different threads.
> > If when ibv_dereg_mr invoke and the thread which invoked ibv_reg_mr has
> > exited, get_pid_task will return NULL, ib_umem_release does not decrease
> > mm->pinned_vm. This patch fixes it by use tgid.
> >
> > Signed-off-by: Lidong Chen <lidongchen@...cent.com>
> > ---
> >  drivers/infiniband/core/umem.c | 12 ++++++------
> >  include/rdma/ib_umem.h         |  2 +-
> >  2 files changed, 7 insertions(+), 7 deletions(-)
>
> Why are we even using a struct pid for this? Does anyone know?
>

Can it be related to "fork" support?

> I'm surprised that struct task isn't held in the struct ib_umem..
>

I think that this code can be removed and all accesses to mm_struct can
be done with "current->mm".

Thanks

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ