Project

General

Profile

Actions

Bug #8805

closed

xattr_dir_lookup() can leak a vnode hold

Added by Vitaliy Gusev over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2017-11-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

When vnode is leaked, directory can not be umounted:

~# zfs umount rpool/T2
cannot unmount '/rpool/T2': Device busy

Steps to reproduce (host should have CPU >= 2 cores):

  1. Compile attached test: gcc xattr_test_loop.c -o xtest
  2. Create dataset: zfs create rpool/T2
  3. Run two instances of xtest: ./xtest /rpool/T2 "a" & ./xtest /rpool/T2 "a" &

Files

xattr_test_loop.c (564 Bytes) xattr_test_loop.c Vitaliy Gusev, 2017-11-15 01:30 PM
fix-illumos-8805.patch (1.02 KB) fix-illumos-8805.patch possible fix Vitaliy Gusev, 2017-11-15 01:36 PM
Actions #2

Updated by Gordon Ross over 5 years ago

Interesting! Can you please add a write-up on how the leaked hold happens?

Actions #3

Updated by Vitaliy Gusev over 5 years ago

Gordon Ross wrote:

Interesting! Can you please add a write-up on how the leaked hold happens?

Look at fixing patch. Comments and assumption from author was wrong: Winner already held Dmitry Podvorny and "looser" has to release Dmitry Podvorny which was held in gfs_file_create()

Actions #5

Updated by Electric Monk over 5 years ago

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

git commit f4f14d92e23977993fc16fdcece27ba510a6d40b

commit  f4f14d92e23977993fc16fdcece27ba510a6d40b
Author: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Date:   2018-01-24T14:32:29.000Z

    8805 xattr_dir_lookup() can leak a vnode hold
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF