Skip to contentSkip to conversation

libxl: libxl_internal.h: Clarify ao rule against internal callers

PATCH In review Ian Jackson 3 participants 5 messages Jun 11, 2015 – Jun 12, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: libxl_internal.h: Clarify ao rule against internal callers

CC Ian Campbell <[email protected]>
CC Wei Liu <[email protected]>
CC Juergen Gross <[email protected]>
---
 tools/libxl/libxl_internal.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/libxl/libxl_internal.h +3 -2
index 465aaaa..bfc0729 100644
@@ -1911,8 +1911,9 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
  * All "slow" functions (see below for the exact definition) need to
  * use the asynchronous operation ("ao") machinery.  The function
  * should take a parameter const libxl_asyncop_how *ao_how and must
- * start with a call to AO_INITIATOR_ENTRY.  These functions MAY NOT
- * be called from inside libxl, because they can cause reentrancy
+ * start with a call to AO_CREATE or equivalent.  These functions MAY
+ * NOT be called from inside libxl (regardless of what is passed for
+ * ao_how), because they can cause reentrancy hazards due to
  * callbacks.
  *
  * For the same reason functions taking an ao_how may make themselves
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Ian Jackson
CC Ian Campbell <[email protected]>
CC Wei Liu <[email protected]>
CC Juergen Gross <[email protected]>
---
  tools/libxl/libxl_internal.h |    5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
tools/libxl/libxl_internal.h +0 -0
index 465aaaa..bfc0729 100644
@@ -1911,8 +1911,9 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
   * All "slow" functions (see below for the exact definition) need to

tools/libxl/libxl_internal.h _hidden void libxl__egc_cleanup(libxl__egc *egc); · line 1919

Quoted 10 lines
tools/libxl/libxl_internal.h +3 -2
   * use the asynchronous operation ("ao") machinery.  The function
   * should take a parameter const libxl_asyncop_how *ao_how and must
- * start with a call to AO_INITIATOR_ENTRY.  These functions MAY NOT
- * be called from inside libxl, because they can cause reentrancy
+ * start with a call to AO_CREATE or equivalent.  These functions MAY
+ * NOT be called from inside libxl (regardless of what is passed for
+ * ao_how), because they can cause reentrancy hazards due to
   * callbacks.
   *
   * For the same reason functions taking an ao_how may make themselves

Now it's 100% clear what to avoid.

#2 lore raw

Juergen Gross writes ("Re: [Xen-devel] [PATCH] libxl: libxl_internal.h: Clarify ao rule against internal callers"):

Quoted 3 lines

Now it's 100% clear what to avoid.

Thanks, pushed.

Ian.

Acked-by on v1 1/1
#3 lore raw
In reply to Ian Jackson
Quoted 4 lines · Ian Jackson
CC Ian Campbell <[email protected]>
CC Wei Liu <[email protected]>
CC Juergen Gross <[email protected]>

AO_INITIATOR_ENTRY was just a stray remainder of some wip name?

Quoted 20 lines
---
 tools/libxl/libxl_internal.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/libxl/libxl_internal.h +3 -2
index 465aaaa..bfc0729 100644
@@ -1911,8 +1911,9 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
  * All "slow" functions (see below for the exact definition) need to
  * use the asynchronous operation ("ao") machinery.  The function
  * should take a parameter const libxl_asyncop_how *ao_how and must
- * start with a call to AO_INITIATOR_ENTRY.  These functions MAY NOT
- * be called from inside libxl, because they can cause reentrancy
+ * start with a call to AO_CREATE or equivalent.  These functions MAY
+ * NOT be called from inside libxl (regardless of what is passed for
+ * ao_how), because they can cause reentrancy hazards due to
  * callbacks.
  *
  * For the same reason functions taking an ao_how may make themselves