~ddstreet/systemd/+git/systemd:udevd_inotify

Last commit made on 2020-04-26
Get this branch:
git clone -b udevd_inotify https://git.launchpad.net/~ddstreet/systemd/+git/systemd

Branch merges

Branch information

Name:
udevd_inotify
Repository:
lp:~ddstreet/systemd/+git/systemd

Recent commits

011b6a6... by Dan Streetman

udevd: add short-duration inotify watch during udev block device event processing

While external programs that take an exclusive flock on block devices while
modifying them (e.g. partitioning or mkfs) will safely work with udevd so
that the block device modifications don't race with udevd processing of the
device (e.g. creating symlinks for the newly-created partitions), any
external program that doesn't take an exclusive flock will race with udevd,
and the changes made to the block device may be missed by udevd, leading to
failures, e.g. udevd might not create the symlinks for new partitions, or
might not create the /dev/disk/by-* for new filesystems.

This updates the flock function to also take a short-duration inotify
watch, so that after processing the device, udevd can synthesize a new
uevent if it detected any IN_CLOSE_WRITE while the device was being
processed, before the real watch was added.

One example is the mkswap that we ourselves actually run, from the service
created by cryptsetup-generator; we have it running mkswap:

if (swap)
  fprintf(f,
    "ExecStartPost=/sbin/mkswap '/dev/mapper/%s'\n",
    name_escaped);

However, this is racy, because it doesn't take an exclusive flock. This
(and probably other places in our own code) should have done "flock ..."
instead. If it's hard for us to get this right, it seems too much to
expect all other non-systemd programs to also be aware they need to flock
the block device.

Fixes: #10179

3b4ea09... by Frantisek Sumsal <email address hidden>

ci: introduce CIFuzz

Per-PR fuzzing provided by OSS-Fuzz using GH workflows.

See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/

feb7d7a... by Thomas Haller

dhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const

c13f464... by Zbigniew Jędrzejewski-Szmek

Merge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs

e269725... by Zbigniew Jędrzejewski-Szmek

Merge pull request #15564 from poettering/tmpfiles-no-proc

util-lib: check for /proc being mounted in some really basic fs operations

425d5ce... by Daan De Meyer

sd-bus: Add sd_bus_get_name/owner_creds docs

11f9379... by Zbigniew Jędrzejewski-Szmek

Merge pull request #15570 from poettering/cmsg-find

CMSG_FIND_DATA() and cmsg_find() work

41ab8c6... by Lennart Poettering <email address hidden>

tree-wide: use structured initialization at various places

2efa5bc... by Lennart Poettering <email address hidden>

dhcp-server: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

2adfd1b... by Lennart Poettering <email address hidden>

icmp6-util: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.