Message ID | 1446746528-25786-1-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Accepted |
Commit | 5cd017d1bd21df76b35b16edbb959ce6bec3cc87 |
Headers | show |
ping On Thu, Nov 5, 2015 at 12:02 PM, Bill Fischofer <bill.fischofer@linaro.org> wrote: > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > platform/linux-generic/odp_pool.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/platform/linux-generic/odp_pool.c > b/platform/linux-generic/odp_pool.c > index 76a4aa5..9fd64d6 100644 > --- a/platform/linux-generic/odp_pool.c > +++ b/platform/linux-generic/odp_pool.c > @@ -540,6 +540,8 @@ void odp_buffer_free(odp_buffer_t buf) > odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); > pool_entry_t *pool = odp_buf_to_pool(buf_hdr); > > + ODP_ASSERT(buf_hdr->allocator != ODP_FREEBUF); > + > if (odp_unlikely(pool->s.low_wm_assert)) > ret_buf(&pool->s, buf_hdr); > else > -- > 2.1.4 > >
Just curious does this issue not happen in production build? Regards, Bala On 5 November 2015 at 23:32, Bill Fischofer <bill.fischofer@linaro.org> wrote: > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > platform/linux-generic/odp_pool.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c > index 76a4aa5..9fd64d6 100644 > --- a/platform/linux-generic/odp_pool.c > +++ b/platform/linux-generic/odp_pool.c > @@ -540,6 +540,8 @@ void odp_buffer_free(odp_buffer_t buf) > odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); > pool_entry_t *pool = odp_buf_to_pool(buf_hdr); > > + ODP_ASSERT(buf_hdr->allocator != ODP_FREEBUF); > + > if (odp_unlikely(pool->s.low_wm_assert)) > ret_buf(&pool->s, buf_hdr); > else > -- > 2.1.4 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
Just read the discussion in other thread. Seems reasonable For the series: Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Regards, Bala On 25 January 2016 at 10:56, Bala Manoharan <bala.manoharan@linaro.org> wrote: > Just curious does this issue not happen in production build? > > Regards, > Bala > > > On 5 November 2015 at 23:32, Bill Fischofer <bill.fischofer@linaro.org> wrote: >> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> >> --- >> platform/linux-generic/odp_pool.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c >> index 76a4aa5..9fd64d6 100644 >> --- a/platform/linux-generic/odp_pool.c >> +++ b/platform/linux-generic/odp_pool.c >> @@ -540,6 +540,8 @@ void odp_buffer_free(odp_buffer_t buf) >> odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); >> pool_entry_t *pool = odp_buf_to_pool(buf_hdr); >> >> + ODP_ASSERT(buf_hdr->allocator != ODP_FREEBUF); >> + >> if (odp_unlikely(pool->s.low_wm_assert)) >> ret_buf(&pool->s, buf_hdr); >> else >> -- >> 2.1.4 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp
Merged, Maxim. On 01/25/2016 08:34, Bala Manoharan wrote: > Just read the discussion in other thread. Seems reasonable > > For the series: > Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> > Regards, > Bala > > > On 25 January 2016 at 10:56, Bala Manoharan <bala.manoharan@linaro.org> wrote: >> Just curious does this issue not happen in production build? >> >> Regards, >> Bala >> >> >> On 5 November 2015 at 23:32, Bill Fischofer <bill.fischofer@linaro.org> wrote: >>> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> >>> --- >>> platform/linux-generic/odp_pool.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c >>> index 76a4aa5..9fd64d6 100644 >>> --- a/platform/linux-generic/odp_pool.c >>> +++ b/platform/linux-generic/odp_pool.c >>> @@ -540,6 +540,8 @@ void odp_buffer_free(odp_buffer_t buf) >>> odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); >>> pool_entry_t *pool = odp_buf_to_pool(buf_hdr); >>> >>> + ODP_ASSERT(buf_hdr->allocator != ODP_FREEBUF); >>> + >>> if (odp_unlikely(pool->s.low_wm_assert)) >>> ret_buf(&pool->s, buf_hdr); >>> else >>> -- >>> 2.1.4 >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 76a4aa5..9fd64d6 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -540,6 +540,8 @@ void odp_buffer_free(odp_buffer_t buf) odp_buffer_hdr_t *buf_hdr = odp_buf_to_hdr(buf); pool_entry_t *pool = odp_buf_to_pool(buf_hdr); + ODP_ASSERT(buf_hdr->allocator != ODP_FREEBUF); + if (odp_unlikely(pool->s.low_wm_assert)) ret_buf(&pool->s, buf_hdr); else
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- platform/linux-generic/odp_pool.c | 2 ++ 1 file changed, 2 insertions(+)