1
0
mirror of https://github.com/systemd/systemd synced 2026-04-23 23:44:50 +02:00

Compare commits

..

No commits in common. "f777e745a7966ea52ef29f9e4edfdd16874cfe86" and "6d39da79c85d35e95d3993fa6b8873fccda33bd9" have entirely different histories.

2 changed files with 9 additions and 8 deletions

View File

@ -12,12 +12,15 @@
#define _FOREACH_INOTIFY_EVENT(e, buffer, sz, log_level, start, end) \
for (struct inotify_event \
*start = &((buffer).ev), \
*start = &((buffer).ev), \
*end = (struct inotify_event*) ((uint8_t*) start + (sz)), \
*e = start; \
(size_t) ((uint8_t*) end - (uint8_t*) e) >= sizeof(struct inotify_event) && \
((size_t) ((uint8_t*) end - (uint8_t*) e) >= sizeof(struct inotify_event) + e->len || \
(log_full(log_level, "Received invalid inotify event, ignoring."), false)); \
(uint8_t*) e + sizeof(struct inotify_event) <= (uint8_t*) end && \
(uint8_t*) e + sizeof(struct inotify_event) + e->len <= (uint8_t*) end ? true : \
({ \
log_full(log_level, "Received invalid inotify event, ignoring."); \
false; \
}); \
e = (struct inotify_event*) ((uint8_t*) e + sizeof(struct inotify_event) + e->len))
#define _FOREACH_INOTIFY_EVENT_FULL(e, buffer, sz, log_level) \

View File

@ -210,10 +210,8 @@ DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(worker_hash_op, void, trivial_hash
static void manager_clear_for_worker(Manager *manager) {
assert(manager);
/* Do not use sd_event_source_disable_unref() here, as this is called by both workers and the
* main process. */
manager->inotify_event = sd_event_source_unref(manager->inotify_event);
manager->kill_workers_event = sd_event_source_unref(manager->kill_workers_event);
manager->inotify_event = sd_event_source_disable_unref(manager->inotify_event);
manager->kill_workers_event = sd_event_source_disable_unref(manager->kill_workers_event);
manager->event = sd_event_unref(manager->event);