From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc3 Firefox/1.0.7 Description of problem: Customer found memory leak occurred when "dmsetup load" is executed for non-existing mapping. Version-Release number of selected component (if applicable): kernel-2.6.9-22.EL How reproducible: Always Steps to Reproduce: 1. Run the dmsetup load command for non-existing map like below. # dmsetup remove foo # dd if=/dev/zero of=a bs=1M count=1 # losetup /dev/loop7 a # while true; do echo "0 10 linear 7:7 0" | \ dmsetup load foo >& /dev/null; done 2. Check the memory usage and the /var/log/messages. Actual Results: Memory usage will increase (about 3MB/s on my machine). On IA-32, vmalloc area will soon become short (within about 1 minute) and the following message will appear in the /var/log/messages: -------------------------------------------------------------------- Nov 9 13:33:31 nec-em2 kernel: device-mapper: device doesn't appear to be in the dev hash table. Nov 9 13:34:02 nec-em2 last message repeated 10360 times Nov 9 13:34:10 nec-em2 kernel: allocation failed: out of vmalloc space - use vmalloc=<size> to increase size. -------------------------------------------------------------------- Expected Results: Memory shouldn't be leaked. Additional info: The following patch fixes this problem and it has been posted to the upstream, accepted by Alasdair. https://www.redhat.com/archives/dm-devel/2005-November/msg00066.html
An error path in table_load() forgets to release a table that won't now be referenced.
dm-ioctl-missing-put-in-table-load-error-case.patch
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2006-0132.html