This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] plug preempt leak in _stp_runtime_entryfn_put/get_context
- From: David Smith <dsmith at redhat dot com>
- To: Mateusz Guzik <mguzik at redhat dot com>, systemtap at sourceware dot org
- Date: Mon, 2 May 2016 12:30:17 -0500
- Subject: Re: [PATCH] plug preempt leak in _stp_runtime_entryfn_put/get_context
- Authentication-results: sourceware.org; auth=none
- References: <1462204091-16202-1-git-send-email-mguzik at redhat dot com>
On 05/02/2016 10:48 AM, Mateusz Guzik wrote:
> If _stp_runtime_entryfn_get_context returns a context, preemption
> counter is always incremented. On the other hand
> _stp_runtime_entryfn_put_context only decrements the counter if the
> passed context matches the one currently set on the cpu.
>
> The context can be set to NULL by _stp_runtime_contexts_free, making the
> comparison false and in effect leading to a leak, e.g.:
> timer: _stp_ctl_work_callback+0x0/0x1e0[stap_af8544c7eb51251ef8c
> 377abff659b05_25070] preempt leak: 00000101 -> 00000102
>
> Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
I checked this in. Thanks for the patch!
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)