Project

General

Profile

Actions

Bug #13231

closed

dmu_objset: release bonus buffer in failure path

Added by Jason King 7 months ago. Updated 7 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Port of OpenZFS #6575

Reported by kmemleak during testing of a new patch:

unreferenced object 0xffff9f1c12e38800 (size 1024):
comm "z_upgrade", pid 17842, jiffies 4296870904 (age 8746.268s)
backtrace:
kmemleak_alloc+0x7a/0x100
__kmalloc_node+0x26c/0x510
range_tree_create+0x39/0xa0 [zfs]
dmu_zfetch_init+0x73/0xe0 [zfs]
dnode_create+0x12c/0x3b0 [zfs]
dnode_hold_impl+0x1096/0x1130 [zfs]
dnode_hold+0x23/0x30 [zfs]
dmu_bonus_hold_impl+0x6b/0x370 [zfs]
dmu_bonus_hold+0x1e/0x30 [zfs]
dmu_objset_space_upgrade+0x114/0x310 [zfs]
dmu_objset_userobjspace_upgrade_cb+0xd8/0x150 [zfs]
dmu_objset_upgrade_task_cb+0x136/0x1e0 [zfs]
kthread+0x119/0x150

Reviewed-by: George Melikov <>
Reviewed-by: Brian Behlendorf <>
Reviewed-by: Giuseppe Di Natale <>
Signed-off-by: Gvozden Neskovic <>

From simple inspection, it's obvious we also have this issue.

Actions #1

Updated by Electric Monk 7 months ago

  • Gerrit CR set to 1001
Actions #2

Updated by Patrick Mooney 7 months ago

  • Description updated (diff)
Actions #3

Updated by Jason King 7 months ago

To test, I ran the zfs test suite. All failures were known issues with existing tickets.

Actions #4

Updated by Electric Monk 7 months ago

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

git commit 79db7483beecd0a10eb28f30cdbbe8d4c87381ae

commit  79db7483beecd0a10eb28f30cdbbe8d4c87381ae
Author: Gvozden Neskovic <neskovic@gmail.com>
Date:   2020-10-20T15:48:03.000Z

    13231 dmu_objset: release bonus buffer in failure path
    Reviewed by: George Melikov <mail@gmelikov.ru>
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Mike Zeller <mike.zeller@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF