]> bbs.cooldavid.org Git - net-next-2.6.git/commit
drm: Free devname along with master->unique
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 24 Jul 2010 17:29:36 +0000 (18:29 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 2 Aug 2010 00:14:30 +0000 (10:14 +1000)
commit6e35023ffad0ee74689710f0e81ee80c1019f93b
tree5cd62d35708e1ec2dc07c3cf9591e2d81ba29948
parentddd3d069c08bb1ba83aa4d522fc1360ce4afc270
drm: Free devname along with master->unique

The device name is tightly coupled and created at the same time as the
master->unique address, so we need to free it with the master. Currently
we overwrite it each time we create a new master:

unreferenced object 0xe32c54b0 (size 32):
  comm "Xorg", pid 1455, jiffies 4294721798 (age 3196.879s)
  hex dump (first 32 bytes):
    69 39 31 35 40 70 63 69 3a 30 30 30 30 3a 30 30  i915@pci:0000:00
    3a 30 32 2e 30 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  :02.0.kkkkkkkkk.
  backtrace:
    [<c04e5657>] create_object+0x124/0x1f1
    [<c07cf0f0>] kmemleak_alloc+0x4c/0x90
    [<c04db84c>] __kmalloc+0x155/0x175
    [<f8316665>] drm_setversion+0x11d/0x1b1 [drm]
    [<f83148d4>] drm_ioctl+0x29a/0x356 [drm]
    [<c04f27c4>] vfs_ioctl+0x33/0x91
    [<c04f31cf>] do_vfs_ioctl+0x46b/0x496
    [<c04f3240>] sys_ioctl+0x46/0x66
    [<c040325f>] sysenter_do_call+0x12/0x38
    [<ffffffff>] 0xffffffff

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_stub.c