libxl: libxl_internal.h: Clarify ao rule against internal callers
PATCH 1/1 libxl: libxl_internal.h: Clarify ao rule against internal callers
Signed-off-by Ian Jackson <[email protected]>
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
@@ -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
Quoted 15 lines · Ian Jackson
Signed-off-by Ian Jackson <[email protected]>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@@ -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.
Acked-by Juergen Gross <[email protected]>
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.
Acked-by Juergen Gross <[email protected]>
Thanks, pushed.
Ian.
Quoted 4 lines · Ian Jackson
Signed-off-by Ian Jackson <[email protected]>CC Ian Campbell <[email protected]>CC Wei Liu <[email protected]>CC Juergen Gross <[email protected]>
Acked-by Ian Campbell <[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@@ -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
Ian Campbell writes ("Re: [PATCH] libxl: libxl_internal.h: Clarify ao rule against internal callers"):
Quoted 9 lines · Ian Jackson
Quoted 4 lines
Signed-off-by Ian Jackson <[email protected]>CC Ian Campbell <[email protected]>CC Wei Liu <[email protected]>CC Juergen Gross <[email protected]>Acked-by Ian Campbell <[email protected]>
AO_INITIATOR_ENTRYwas just a stray remainder of some wip name?
Yes.
Thanks,
Ian.