Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udev-node: use flock() for symlink stack directory #23043

Merged
merged 10 commits into from
Sep 12, 2022

Commits on Sep 2, 2022

  1. udev: move udev_node_escape_path()

    No functionality is changed.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    b916827 View commit details
    Browse the repository at this point in the history
  2. udev: split link_update() and introduce stack_directory_get_name()

    No functionality is changed.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    7e7c36f View commit details
    Browse the repository at this point in the history
  3. udev: do not remove stack directory even if it is empty

    Then, we can always assume the directory exists, and the code become
    slightly simpler.
    
    Note, unused directories are removed by the main udevd process in a
    later commit.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    a28d67a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d4f60bd View commit details
    Browse the repository at this point in the history
  5. udev: use readlinkat_malloc()

    And try to read it only when the file is symlink.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    faadf97 View commit details
    Browse the repository at this point in the history
  6. udev: rename link_find_prioritized() and variables

    Also shorten code a bit.
    
    Just for consistency with other part and readability of the code.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    6b01e29 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d6595c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    541a463 View commit details
    Browse the repository at this point in the history
  9. udev: use flock() when updating device node symlinks

    By locking the stack directory, we can safely determine the device node
    with the highest priority for a symlink. So, the multiple try-and-wait
    loops can be dropped, and the code becomes quite simple.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    57a2729 View commit details
    Browse the repository at this point in the history
  10. udev: cleanup stack directory /run/udev/links when all workers exited

    By the previous commit, the stack directories are not removed even if
    it is empty. To reduce the inode usage of /run, let's cleanup the
    directories.
    yuwata committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    1055172 View commit details
    Browse the repository at this point in the history