]> git.proxmox.com Git - mirror_spl-debian.git/commit
Strfree() should call kfree() not kmem_free()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 31 Jul 2010 05:20:58 +0000 (22:20 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 31 Jul 2010 05:20:58 +0000 (22:20 -0700)
commit41f84a8d56c00f3c95a4bf0b6027bedd7abb5b15
treed537ddf811dcd38cb4f313f16674ef3a25d7ed11
parent099dc9c2d275b4475f130f3d03bab88516101b36
Strfree() should call kfree() not kmem_free()

Using kmem_free() results in deducting X bytes from the memory
accounting when --enable-debug is set.  Unfortunately, currently
the counterpart kmem_asprintf() and friends do not properly
account for memory allocated, so we must do the same on free.
If we don't then we end up with a negative number of lost bytes
reported when the module is unloaded.

A better long term fix would be to add the accounting in to the
allocation side but that's a project for another day.
module/spl/spl-kmem.c