Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-23 Thread Ola Liljedahl
On 22 April 2015 at 13:29, Mike Holmes mike.hol...@linaro.org wrote: On 22 April 2015 at 07:26, Bill Fischofer bill.fischo...@linaro.org wrote: Good points. I agree it's better to leave this behavior undefined. If that is consensus I will send a patch for the docs to add. Deleting an

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-23 Thread Maxim Uvarov
On 04/23/15 13:09, Taras Kondratiuk wrote: On 04/22/2015 08:54 PM, Maxim Uvarov wrote: On 04/22/15 19:06, Ciprian Barbu wrote: On Wed, Apr 22, 2015 at 5:13 PM, Maxim Uvarov maxim.uva...@linaro.org wrote: On 04/22/15 15:53, Bill Fischofer wrote: It does that, but as Taras points out there is

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-23 Thread Bala Manoharan
On 23 April 2015 at 16:56, Maxim Uvarov maxim.uva...@linaro.org wrote: On 04/23/15 13:09, Taras Kondratiuk wrote: On 04/22/2015 08:54 PM, Maxim Uvarov wrote: On 04/22/15 19:06, Ciprian Barbu wrote: On Wed, Apr 22, 2015 at 5:13 PM, Maxim Uvarov maxim.uva...@linaro.org wrote: On 04/22/15

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Savolainen, Petri (Nokia - FI/Espoo)
-Original Message- From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of ext Taras Kondratiuk Sent: Wednesday, April 22, 2015 2:47 PM To: Mike Holmes Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy On 04/22/2015 02

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Ciprian Barbu
On Wed, Apr 22, 2015 at 5:13 PM, Maxim Uvarov maxim.uva...@linaro.org wrote: On 04/22/15 15:53, Bill Fischofer wrote: It does that, but as Taras points out there is a race condition. If one thread does an odp_pool_destroy() and it succeeds, another thread could do an odp_pool_create() before

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Mike Holmes
Mailman List Subject: Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy On 04/22/2015 02:29 PM, Mike Holmes wrote: On 22 April 2015 at 07:26, Bill Fischofer bill.fischo...@linaro.org mailto:bill.fischo...@linaro.org wrote: Good points. I agree it's better

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Maxim Uvarov
On 04/22/15 15:53, Bill Fischofer wrote: It does that, but as Taras points out there is a race condition. If one thread does an odp_pool_destroy() and it succeeds, another thread could do an odp_pool_create() before the second odp_pool_destroy() and get the same pool handle which would then

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Maxim Uvarov
On 04/22/15 19:06, Ciprian Barbu wrote: On Wed, Apr 22, 2015 at 5:13 PM, Maxim Uvarov maxim.uva...@linaro.org wrote: On 04/22/15 15:53, Bill Fischofer wrote: It does that, but as Taras points out there is a race condition. If one thread does an odp_pool_destroy() and it succeeds, another

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Bill Fischofer
It does that, but as Taras points out there is a race condition. If one thread does an odp_pool_destroy() and it succeeds, another thread could do an odp_pool_create() before the second odp_pool_destroy() and get the same pool handle which would then be deleted by the second odp_pool_destroy()

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Savolainen, Petri (Nokia - FI/Espoo)
From: ext Mike Holmes [mailto:mike.hol...@linaro.org] Sent: Wednesday, April 22, 2015 4:00 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: ext Taras Kondratiuk; LNG ODP Mailman List Subject: Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy On 22 April 2015 at 08:57, Savolainen

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Taras Kondratiuk
On 04/21/2015 10:14 PM, Mike Holmes wrote: Signed-off-by: Mike Holmes mike.hol...@linaro.org --- test/validation/odp_pool.c | 25 + 1 file changed, 25 insertions(+) diff --git a/test/validation/odp_pool.c b/test/validation/odp_pool.c index 1a518a0..c2f9a1b 100644 ---

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Bill Fischofer
Good points. I agree it's better to leave this behavior undefined. On Wed, Apr 22, 2015 at 5:44 AM, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 04/21/2015 10:14 PM, Mike Holmes wrote: Signed-off-by: Mike Holmes mike.hol...@linaro.org --- test/validation/odp_pool.c | 25

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Mike Holmes
On 22 April 2015 at 06:44, Taras Kondratiuk taras.kondrat...@linaro.org wrote: On 04/21/2015 10:14 PM, Mike Holmes wrote: Signed-off-by: Mike Holmes mike.hol...@linaro.org --- test/validation/odp_pool.c | 25 + 1 file changed, 25 insertions(+) diff --git

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Mike Holmes
On 22 April 2015 at 07:26, Bill Fischofer bill.fischo...@linaro.org wrote: Good points. I agree it's better to leave this behavior undefined. If that is consensus I will send a patch for the docs to add. Deleting an already deleted pool results in unspecified behavior. On Wed, Apr 22,

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Bill Fischofer
We just need to be specific about what we're testing here. This really is no different than attempting to free a memory area twice. Clearly an error, but do we require an implementation to detect and report this or is it an application responsibility? Taras' point about race conditions in

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-22 Thread Taras Kondratiuk
On 04/22/2015 02:29 PM, Mike Holmes wrote: On 22 April 2015 at 07:26, Bill Fischofer bill.fischo...@linaro.org mailto:bill.fischo...@linaro.org wrote: Good points. I agree it's better to leave this behavior undefined. If that is consensus I will send a patch for the docs to add.

Re: [lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-21 Thread Bill Fischofer
On Tue, Apr 21, 2015 at 2:14 PM, Mike Holmes mike.hol...@linaro.org wrote: Signed-off-by: Mike Holmes mike.hol...@linaro.org Reviewed-by: Bill Fischofer bill.fischo...@linaro.org --- test/validation/odp_pool.c | 25 + 1 file changed, 25 insertions(+) diff --git

[lng-odp] [PATCH] validation: odp_pool: add double destroy

2015-04-21 Thread Mike Holmes
Signed-off-by: Mike Holmes mike.hol...@linaro.org --- test/validation/odp_pool.c | 25 + 1 file changed, 25 insertions(+) diff --git a/test/validation/odp_pool.c b/test/validation/odp_pool.c index 1a518a0..c2f9a1b 100644 --- a/test/validation/odp_pool.c +++