Project

General

Profile

Bug #8062

memory leak in smb_unicode_init()

Added by Prakash Surya almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2017-04-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

There's a memory leak in `smbsrv`:

kmem_oversize leak: 80 vmem_segs, 393256 bytes each, 31460480 bytes total
ADDR TYPE START END SIZE
THREAD TIMESTAMP
ffffff034ae874d8 ALLC ffffff0448219000 ffffff0448279028 393256
ffffff000c462c40 7a51c1bd4a
vmem_hash_insert+0xae
vmem_seg_alloc+0x23e
vmem_xalloc+0x749
vmem_alloc+0x145
kmem_alloc+0x11a
kmem_zalloc+0xed
smbsrv`smb_alloc+0x35
smb_mem_zalloc+0x1b
smb_unicode_init+0xe
smb_codepage_init+0x15
smb_server_g_init+0x42
_init+0xd
modinstall+0x113
mod_hold_installed_mod+0x77
modrload+0xdd
modload+0x17
mod_hold_dev_by_major+0xbf
ndi_hold_driver+0x30
probe_node+0x52
i_ndi_config_node+0x110

The problem is that there's `smb_codepage_init()` but not `smb_codepage_fini()`,
so a `smb_codepage_t *` table is created in `smb_unicode_init()`, but never
destroyed.


Related issues

Has duplicate illumos gate - Bug #7678: smbsrv: Memory leak on module unloadClosed2016-12-19

Actions

History

#1

Updated by Marcel Telka almost 3 years ago

  • Has duplicate Bug #7678: smbsrv: Memory leak on module unload added
#2

Updated by Electric Monk almost 3 years ago

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

git commit adc68ba91854584a470224cdb128a8e1ba16b41b

commit  adc68ba91854584a470224cdb128a8e1ba16b41b
Author: Pavel Zakharov <pavel.zakharov@delphix.com>
Date:   2017-04-14T03:43:13.000Z

    8062 memory leak in smb_unicode_init()
    Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
    Reviewed by: Brad Lewis <brad.lewis@delphix.com>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF