Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Native ZFS for Linux

This branch is 0 commits ahead and 0 commits behind master

Fix zfsdev_ioctl() kmem leak warning

Due to an asymmetry in the kmem accounting a memory leak was being
reported when it was only an accounting issue.  All memory allocated
with kmem_alloc() must be released with kmem_free() or it will not
be properly accounted for.

In this case the code used strfree() to release the memory allocated
by kmem_alloc().  Presumably this was done because the size of the
memory region wasn't available when the memory needed to be freed.

To resolve this issue the code has been updated to use strdup() instead
of kmem_alloc() to allocate the memory.  Like strfree(), strdup() is
not integrated with the memory accounting.  This means we can use
strfree() to release it like Illumos.

  SPL: kmem leaked 10/4368729 bytes
  address          size  data             func:line
  ffff880067e9aa40 10    ZZZZZZZZZZ       zfsdev_ioctl:5655

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Closes #2262
latest commit 4fd762f8ad
Brian Behlendorf authored April 17, 2014
Octocat-spinner-32 cmd Replace zed_file_create_dirs() with mkdirp() April 09, 2014
Octocat-spinner-32 config Linux 3.14 compat: rq_for_each_segment in dmu_req_copy April 10, 2014
Octocat-spinner-32 dracut Refresh dracut module setup March 21, 2013
Octocat-spinner-32 etc Allow specifying '-o <opts>' in defaults/init script. April 04, 2014
Octocat-spinner-32 include Use ddi_time_after and friends to compare time April 14, 2014
Octocat-spinner-32 lib Report atime and relatime as the property's actual value. April 16, 2014
Octocat-spinner-32 man Initial implementation of zed (ZFS Event Daemon) April 02, 2014
Octocat-spinner-32 module Fix zfsdev_ioctl() kmem leak warning April 18, 2014
Octocat-spinner-32 patches Adding grub2 mkconfig support patch July 30, 2012
Octocat-spinner-32 rpm Initial implementation of zed (ZFS Event Daemon) April 02, 2014
Octocat-spinner-32 scripts Various zimport.sh fixes April 17, 2014
Octocat-spinner-32 udev Open pools asynchronously after module load July 03, 2013
Octocat-spinner-32 .gitignore Ignore *.{deb,rpm,tar.gz} files in the top directory. April 24, 2013
Octocat-spinner-32 .gitmodules Add zimport.sh compatibility test script February 21, 2014
Octocat-spinner-32 AUTHORS Fix minor typos and update marketing copy. March 21, 2013
Octocat-spinner-32 COPYRIGHT Refresh links to web site March 06, 2013
Octocat-spinner-32 DISCLAIMER Fix minor typos and update marketing copy. March 21, 2013
Octocat-spinner-32 META Tag zfs-0.6.2 August 22, 2013
Octocat-spinner-32 Makefile.am cstyle: Exclude several files from 'make checkstyle' December 18, 2013
Octocat-spinner-32 OPENSOLARIS.LICENSE Add CDDL license file December 01, 2008
Octocat-spinner-32 README.markdown Fix minor typos and update marketing copy. March 21, 2013
Octocat-spinner-32 autogen.sh build: do not call boilerplate ourself April 02, 2013
Octocat-spinner-32 configure.ac Initial implementation of zed (ZFS Event Daemon) April 02, 2014
Octocat-spinner-32 copy-builtin Consistent menuconfig name August 26, 2012
Octocat-spinner-32 zfs-script-config.sh.in Initial implementation of zed (ZFS Event Daemon) April 02, 2014
Octocat-spinner-32 zfs.release.in Move zfs.release generation to configure step July 12, 2012
README.markdown

Native ZFS for Linux!

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers.

Full documentation for installing ZoL on your favorite Linux distribution can be found at: http://zfsonlinux.org

Something went wrong with that request. Please try again.