Re: [PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-28 Thread Shawn Bohrer
On Thu, Aug 28, 2014 at 02:48:19PM +0300, Haggai Eran wrote: > On 26/08/2014 00:07, Shawn Bohrer wrote: > The following patch fixes the issue by storing the mm_struct of the > >> > > >> > You are doing more than just storing the mm_struct - you are taking > >> > a reference to the process'

Re: [PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-28 Thread Haggai Eran
On 26/08/2014 00:07, Shawn Bohrer wrote: The following patch fixes the issue by storing the mm_struct of the >> > >> > You are doing more than just storing the mm_struct - you are taking >> > a reference to the process' mm. This can lead to a massive resource >> > leakage. The reason is bit

Re: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-28 Thread Haggai Eran
On 26/08/2014 00:07, Shawn Bohrer wrote: The following patch fixes the issue by storing the mm_struct of the You are doing more than just storing the mm_struct - you are taking a reference to the process' mm. This can lead to a massive resource leakage. The reason is bit complex: The

Re: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-28 Thread Shawn Bohrer
On Thu, Aug 28, 2014 at 02:48:19PM +0300, Haggai Eran wrote: On 26/08/2014 00:07, Shawn Bohrer wrote: The following patch fixes the issue by storing the mm_struct of the You are doing more than just storing the mm_struct - you are taking a reference to the process' mm. This can lead

Re: [PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-25 Thread Shawn Bohrer
On Thu, Aug 21, 2014 at 11:20:34AM +, Shachar Raindel wrote: > Hi, > > I'm afraid this patch, in its current form, will not work. > See below for additional comments. Thanks for the input Shachar. I've tried to answer your questions below. > > > In debugging an application that receives

Re: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-25 Thread Shawn Bohrer
On Thu, Aug 21, 2014 at 11:20:34AM +, Shachar Raindel wrote: Hi, I'm afraid this patch, in its current form, will not work. See below for additional comments. Thanks for the input Shachar. I've tried to answer your questions below. In debugging an application that receives -ENOMEM

RE: [PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-21 Thread Shachar Raindel
> To: Roland Dreier > Cc: Christoph Lameter; Sean Hefty; Hal Rosenstock; linux- > r...@vger.kernel.org; linux-kernel@vger.kernel.org; > t...@rgmadvisors.com; Shawn Bohrer > Subject: Re: [PATCH] ib_umem_release should decrement mm->pinned_vm > from ib_umem_get > > On Tue,

RE: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-21 Thread Shachar Raindel
Cc: Christoph Lameter; Sean Hefty; Hal Rosenstock; linux- r...@vger.kernel.org; linux-kernel@vger.kernel.org; t...@rgmadvisors.com; Shawn Bohrer Subject: Re: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get On Tue, Aug 12, 2014 at 11:27:35AM -0500, Shawn Bohrer wrote

Re: [PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-20 Thread Shawn Bohrer
On Tue, Aug 12, 2014 at 11:27:35AM -0500, Shawn Bohrer wrote: > From: Shawn Bohrer > > In debugging an application that receives -ENOMEM from ib_reg_mr() I > found that ib_umem_get() can fail because the pinned_vm count has > wrapped causing it to always be larger than the lock limit even with >

Re: [PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-20 Thread Shawn Bohrer
On Tue, Aug 12, 2014 at 11:27:35AM -0500, Shawn Bohrer wrote: From: Shawn Bohrer sboh...@rgmadvisors.com In debugging an application that receives -ENOMEM from ib_reg_mr() I found that ib_umem_get() can fail because the pinned_vm count has wrapped causing it to always be larger than the lock

[PATCH] ib_umem_release should decrement mm->pinned_vm from ib_umem_get

2014-08-12 Thread Shawn Bohrer
From: Shawn Bohrer In debugging an application that receives -ENOMEM from ib_reg_mr() I found that ib_umem_get() can fail because the pinned_vm count has wrapped causing it to always be larger than the lock limit even with RLIMIT_MEMLOCK set to RLIM_INFINITY. The wrapping of pinned_vm occurs

[PATCH] ib_umem_release should decrement mm-pinned_vm from ib_umem_get

2014-08-12 Thread Shawn Bohrer
From: Shawn Bohrer sboh...@rgmadvisors.com In debugging an application that receives -ENOMEM from ib_reg_mr() I found that ib_umem_get() can fail because the pinned_vm count has wrapped causing it to always be larger than the lock limit even with RLIMIT_MEMLOCK set to RLIM_INFINITY. The wrapping