From 7dae316d50450bfb1c6af46ac8040f634fb09e26 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Feb 2014 16:50:51 +0100 Subject: [PATCH] ta: clarify a corner case --- ta/ta.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ta/ta.c b/ta/ta.c index eda77076ee..0045024833 100644 --- a/ta/ta.c +++ b/ta/ta.c @@ -105,6 +105,10 @@ static struct ta_ext_header *get_or_alloc_ext_header(void *ptr) * Setting parent==NULL (with ptr!=NULL) always succeeds, and unsets the * parent of ptr. Operations ptr==NULL always succeed and do nothing. * Returns true on success, false on OOM. + * + * Warning: if ta_parent is a direct or indirect child of ptr, things will go + * wrong. The function will apparently succeed, but creates circular + * parent links, which are not allowed. */ bool ta_set_parent(void *ptr, void *ta_parent) {