This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] uprobes: register_uprobe() crashes when bailing out.
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Torsten Polle <Torsten dot Polle at gmx dot de>
- Cc: systemtap at sourceware dot org
- Date: Fri, 12 Apr 2013 20:08:55 -0400
- Subject: Re: [PATCH] uprobes: register_uprobe() crashes when bailing out.
- References: <m2mwt62k7r dot fsf at gmx dot de>
Hi -
Torsten.Polle wrote:
> [...]
> Subject: [PATCH] uprobes: register_uprobe() crashes when bailing out.
>
> uprobe_mk_process() initialises uproc->hlist, but does not put uproc on any
> list, i.e. uproc_table. If register_uprobe() now bails out before uproc is put
> on a list, uprobe_free_process() still tries to remove uproc from a list. But
> hlist_del() only works, if the element is already on list. hlist_del_init()
> first checks if the element is on any list, before it removes the element
> (uproc) from the list.
That description doesn't sound quite right to me. I could be
mistaken, but I thought the hlist_del_init() variant was available so
that the hlist pointers are cleared after deletion (for purposes of
reuse in a different list perhaps), not in order to be checked for
list-membership before deletion. This The change may still be right,
but perhaps for a different reason.
- FChE