Project

General

Profile

Bug #7233

dir_is_empty should open directory with CLOEXEC

Added by Daniel Kimmel about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2016-07-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

This fixes a race where one thread is executing zfs_mount() while another thread forks and execs. If the fork occurs while the directory is open, the child process will inherit (but not necessarily close immediately) the open fd for the directory, preventing the mount.

History

#1

Updated by Electric Monk about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit d420209d9c807f782c1d31f5683be74798142198

commit  d420209d9c807f782c1d31f5683be74798142198
Author: Alex Reece <alex@delphix.com>
Date:   2016-08-18T23:48:06.000Z

    7233 dir_is_empty should open directory with CLOEXEC
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF