aboutsummaryrefslogtreecommitdiff
path: root/collector/devstat_freebsd.h
diff options
context:
space:
mode:
authorDominik Honnef <dominik@honnef.co>2016-12-31 06:52:44 +0100
committerDominik Honnef <dominik@honnef.co>2017-01-05 05:38:26 +0100
commitea55d0f5cb8062f311891c20f2d5d11c62241cf8 (patch)
tree4111c55ae92b5c21b7ace6722a6fc8fa5e0e406f /collector/devstat_freebsd.h
parent5e220c1665e1cdbdb69cdcf6789f176ca907bd6e (diff)
downloadprometheus_node_collector-ea55d0f5cb8062f311891c20f2d5d11c62241cf8.tar.bz2
prometheus_node_collector-ea55d0f5cb8062f311891c20f2d5d11c62241cf8.tar.xz
prometheus_node_collector-ea55d0f5cb8062f311891c20f2d5d11c62241cf8.zip
Don't race in FreeBSD devstat collector
Querying the number of devices separately from the device list itself is racy. Devices may be added or removed between the two calls; and removed devices would lead to a segfault.
Diffstat (limited to 'collector/devstat_freebsd.h')
-rw-r--r--collector/devstat_freebsd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/collector/devstat_freebsd.h b/collector/devstat_freebsd.h
index 13ea4bc..87f09f0 100644
--- a/collector/devstat_freebsd.h
+++ b/collector/devstat_freebsd.h
@@ -38,4 +38,4 @@ typedef struct {
38 38
39 39
40int _get_ndevs(); 40int _get_ndevs();
41Stats _get_stats(int i); 41int _get_stats(Stats **stats);