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

loopback: fix race condition opening loopback device #2039

Merged

Commits on Jul 23, 2024

  1. loopback: use fstat on the open file descriptor

    move the stat call later after the file is already opened so it is
    less vulnerable to the file being removed between the stat and the
    open syscall.
    
    Signed-off-by: Giuseppe Scrivano <[email protected]>
    giuseppe committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    b23e274 View commit details
    Browse the repository at this point in the history
  2. loopback: fix race condition opening loopback device

    the loopback device file could be already used/removed by another
    process.  Since the process is inherently racy, just grab the next
    available index and try again until it succeeds.
    
    Closes: containers#2038
    
    Signed-off-by: Giuseppe Scrivano <[email protected]>
    giuseppe committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    01c633e View commit details
    Browse the repository at this point in the history
  3. loopback: treat ENXIO as ENOENT

    Signed-off-by: Giuseppe Scrivano <[email protected]>
    giuseppe committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    998e6d4 View commit details
    Browse the repository at this point in the history