From 55aa55c24fe77aae07d530662f91b4d50c4990f0 Mon Sep 17 00:00:00 2001 From: Chuck Silvers Date: Wed, 30 Jun 2021 02:48:56 -0700 Subject: executor: initialize scope in fault_ioc_info The "scope" field of struct fault_ioc_info is an input to the ioctl, so initialize it to FAULT_SCOPE_LWP to match other fault_ioc_* usage. --- AUTHORS | 1 + CONTRIBUTORS | 3 ++- executor/common_bsd.h | 1 + pkg/csource/generated.go | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 60dd3073d..635b25450 100644 --- a/AUTHORS +++ b/AUTHORS @@ -45,3 +45,4 @@ Johannes Wellhöfer Microsoft Corporation Muhammad Usama Anjum ANSSI +Chuck Silvers diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e22345915..25f3684a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -92,4 +92,5 @@ Microsoft Corporation Mickaël Salaün ANSSI Vincent Dagonneau -Desmond Cheong Zhi Xi \ No newline at end of file +Desmond Cheong Zhi Xi +Chuck Silvers diff --git a/executor/common_bsd.h b/executor/common_bsd.h index 398d402fb..131ab0764 100644 --- a/executor/common_bsd.h +++ b/executor/common_bsd.h @@ -73,6 +73,7 @@ static int fault_injected(int fd) struct fault_ioc_disable dis; int res; + info.scope = FAULT_SCOPE_LWP; if (ioctl(fd, FAULT_IOC_GETINFO, &info) != 0) fail("FAULT_IOC_GETINFO failed"); res = (info.nfaults > 0); diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index a162ad9f6..1d3bcccf0 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -1613,6 +1613,7 @@ static int fault_injected(int fd) struct fault_ioc_disable dis; int res; + info.scope = FAULT_SCOPE_LWP; if (ioctl(fd, FAULT_IOC_GETINFO, &info) != 0) fail("FAULT_IOC_GETINFO failed"); res = (info.nfaults > 0); -- cgit mrf-deployment