From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Paasch Subject: Kmemleak: false-positive in vring_add_indirect ? Date: Wed, 2 Oct 2013 22:20:47 +0200 Message-ID: <20131002202047.GA7419@cpaasch-mac> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" List-Id: virtualization@lists.linuxfoundation.org Hello, I have been hunting a memory-leak warning in vring_add_indirect: unreferenced object 0xffff88003d467e20 (size 32): comm "softirq", pid 0, jiffies 4295197765 (age 6.364s) hex dump (first 32 bytes): 28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00 (..=............ 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q<....V....... backtrace: [] kmemleak_alloc+0x59/0xc0 [] __kmalloc+0xf3/0x180 [] vring_add_indirect+0x36/0x280 [] virtqueue_add_outbuf+0xbf/0x4e0 [] start_xmit+0x1a0/0x3b0 [] dev_hard_start_xmit+0x2d1/0x4d0 [] sch_direct_xmit+0xf2/0x1c0 [] dev_queue_xmit+0x1c8/0x460 [] ip6_finish_output2+0x1d7/0x470 [] ip6_finish_output+0x90/0xb0 [] ip6_output+0x37/0xb0 [] igmp6_send+0x2db/0x470 [] igmp6_timer_handler+0x95/0xa0 [] call_timer_fn+0x2c/0x90 [] run_timer_softirq+0x1da/0x1f0 [] __do_softirq+0xd1/0x1b0 May it be that the allocated memory within vring_add_indirect should be marked as kmemleak_ignore(), because it is mapped from a virtual to a physical address and thus kmemleak cannot detect that the memory is actually still being referenced. Thanks for your help, Christoph