mirror of
https://github.com/systemd/systemd
synced 2024-09-06 00:41:36 +00:00
core: prevent excessive /proc/self/mountinfo parsing
This commit is contained in:
parent
68d8906517
commit
d586f642fd
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue