From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/3] runner: Make sure we don't close watchdogs twice
Date: Tue, 9 Jul 2019 15:23:43 +0300 [thread overview]
Message-ID: <20190709122345.29180-1-arkadiusz.hiler@intel.com> (raw)
Setting the watchdog fd lists to NULL for extra fireworks if accessed
unintentionally.
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
runner/executor.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/runner/executor.c b/runner/executor.c
index 7a7e29d9..af02c5a8 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -46,6 +46,10 @@ static void close_watchdogs(struct settings *settings)
for (i = 0; i < watchdogs.num_dogs; i++) {
__close_watchdog(watchdogs.fds[i]);
}
+
+ free(watchdogs.fds);
+ watchdogs.num_dogs = 0;
+ watchdogs.fds = NULL;
}
static void close_watchdogs_atexit(void)
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-07-09 12:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 12:23 Arkadiusz Hiler [this message]
2019-07-09 12:23 ` [igt-dev] [PATCH i-g-t 2/3] runner: Warn when watchdogs are being closed from the exit handler Arkadiusz Hiler
2019-07-10 8:20 ` Ser, Simon
2019-07-09 12:23 ` [igt-dev] [PATCH i-g-t 3/3] runner: Make sure that we are closing watchdogs on signals Arkadiusz Hiler
2019-07-18 10:57 ` Ser, Simon
2019-07-19 11:25 ` Arkadiusz Hiler
2019-07-19 11:31 ` Ser, Simon
2019-07-19 12:01 ` [igt-dev] [PATCH v2 " Arkadiusz Hiler
2019-07-19 12:04 ` Ser, Simon
2019-07-09 13:04 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] runner: Make sure we don't close watchdogs twice Patchwork
2019-07-10 0:24 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-07-10 8:18 ` [igt-dev] [PATCH i-g-t 1/3] " Ser, Simon
2019-07-19 13:31 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] runner: Make sure we don't close watchdogs twice (rev2) Patchwork
2019-07-19 16:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-07-22 10:24 ` [igt-dev] [PATCH i-g-t 1/3] runner: Make sure we don't close watchdogs twice Petri Latvala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709122345.29180-1-arkadiusz.hiler@intel.com \
--to=arkadiusz.hiler@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox