projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68d8906
)
core: prevent excessive /proc/self/mountinfo parsing
author
Michal Sekletár
<msekleta@redhat.com>
Thu, 9 Jul 2020 16:16:44 +0000
(18:16 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 1 Dec 2020 14:15:39 +0000
(15:15 +0100)
src/core/mount.c
patch
|
blob
|
history
diff --git
a/src/core/mount.c
b/src/core/mount.c
index e672796694b6985c2a6e503a071a2873d583256e..5479cf7bf21f4dfbed808dcc992994ee5493484b 100644
(file)
--- a/
src/core/mount.c
+++ b/
src/core/mount.c
@@
-1855,6
+1855,12
@@
static void mount_enumerate(Manager *m) {
goto fail;
}
+ r = sd_event_source_set_ratelimit(m->mount_event_source, 1 * USEC_PER_SEC, 5);
+ if (r < 0) {
+ log_error_errno(r, "Failed to enable rate limit for mount events: %m");
+ goto fail;
+ }
+
(void) sd_event_source_set_description(m->mount_event_source, "mount-monitor-dispatch");
}