mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03: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…
x
Reference in New Issue
Block a user