Bug 1220915 - regression in overlayfs on 4.0
Summary: regression in overlayfs on 4.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-12 19:52 UTC by Vincent Batts
Modified: 2015-05-26 03:38 UTC (History)
8 users (show)

Fixed In Version: kernel-4.0.4-300.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-26 03:38:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vincent Batts 2015-05-12 19:52:42 UTC
Description of problem:
rmdir of a non-empty directory, that has a whiteout, will remove successfully.

Version-Release number of selected component (if applicable):
4.0.2-300.fc22.x86_64

How reproducible:
consistent

Steps to Reproduce:
```
base=$(mktemp -d)
echo ${base}

## make an overlay fs setup
mkdir -p ${base}/{upper,work,merged,mnt,lower}

## make an empty directory in the base layer
mkdir ${base}/lower/empty

## mount the base layer
sudo mount \
        -t overlay \
        -o rw,lowerdir=${base}/lower/,workdir=${base}/work/,upperdir=${base}/upper/ \
        ${base}/merged/ ${base}/mnt/

## create a whiteout
rmdir ${base}/mnt/empty

## add the dir back (on top of the whiteout)
mkdir -p ${base}/mnt/empty
touch ${base}/mnt/empty/file.txt

## now rm the non-empty directory
rmdir ${base}/mnt/empty && echo "bug here!"

## cleanup and info
sudo umount ${base}/mnt
sudo find ${base}

```

Actual results:
rmdir removes the non-empty directory and returns success

Expected results:
failure to rmdir the non-empty directory


Additional info:
Found in a docker issue report - https://github.com/docker/docker/issues/13108

Comment 1 Josh Boyer 2015-05-14 12:22:16 UTC
Added the patch from upstream in Fedora git.

Comment 2 Fedora Update System 2015-05-19 11:39:59 UTC
kernel-4.0.4-300.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/kernel-4.0.4-300.fc22

Comment 3 Fedora Update System 2015-05-20 02:52:44 UTC
Package kernel-4.0.4-300.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-4.0.4-300.fc22'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-8534/kernel-4.0.4-300.fc22
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-05-26 03:38:27 UTC
kernel-4.0.4-300.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.