Bug 26767

Summary: kmemleak complain about possible memory leak
Product: xorg Reporter: Felipe Balbi <me>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.5 (2009.10)   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Felipe Balbi 2010-02-26 01:56:57 UTC
When running kernel with kmemleak enabled, we keep seeing on dmesg suspects of new memory leaks, looking at /sys/kernel/debug/kmemleak says that nouveau might be the one to be blamed:

unreferenced object 0xf6175390 (size 148):
  comm "X", pid 8910, jiffies 4294890281 (age 6196.003s)
  hex dump (first 32 bytes):
    06 82 00 00 00 00 00 00 e0 84 a8 f3 80 81 a8 f3  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<c1433abb>] kmemleak_alloc+0x2a/0x47
    [<c10b5faa>] kmem_cache_alloc+0xa8/0xf6
    [<c11a11b5>] idr_pre_get+0x27/0x60
    [<f8144ca2>] drm_gem_handle_create+0x25/0x6f [drm]
    [<f81f6780>] nouveau_gem_ioctl_new+0x201/0x262 [nouveau]
    [<f81436a1>] drm_ioctl+0x268/0x310 [drm]
    [<c10c6238>] vfs_ioctl+0x27/0x8c
    [<c10c67b4>] do_vfs_ioctl+0x46e/0x4a8
    [<c10c6833>] sys_ioctl+0x45/0x5f
    [<c100290c>] sysenter_do_call+0x12/0x22
    [<ffffffff>] 0xffffffff

As an extra detail, I'm using current linux-2.6 head (baac35c4155a8aa826c70acee6553368ca5243a2) plus x11 overlay on gentoo
Comment 1 Felipe Balbi 2010-02-26 01:59:36 UTC
looking at the actual code, it appears to be a false positive since idr_remove() is called on drm_gem_handle_delete(). If I'm right, please close this bug and sorry for the inconvenience.
Comment 2 Ilia Mirkin 2013-08-18 18:09:15 UTC
It appears that this bug report has laid dormant for quite a while. Sorry we haven't gotten to it. Since we fix bugs all the time, chances are pretty good that your issue has been fixed with the latest software. Please give it a shot. (Linux kernel 3.10.7, xf86-video-nouveau 1.0.9, mesa 9.1.6, or their git versions.) If upgrading to the latest isn't an option for you, your distro's bugzilla is probably the right destination for your bug report.

In an effort to clean up our bug list, we're pre-emptively closing all bugs that haven't seen updates since 2011. If the original issue remains, please make sure to provide fresh info, see http://nouveau.freedesktop.org/wiki/Bugs/ for what we need to see, and re-open this one.

Thanks,

The Nouveau Team

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.