Re: [syzbot] memory leak in drm_vma_node_allow

From: Dmitry Vyukov
Date: Thu Mar 25 2021 - 10:28:39 EST


On Thu, Mar 25, 2021 at 2:31 PM Igor Torrente <igormtorrente@xxxxxxxxx> wrote:
>
> Hello,
>
> Anyone can inform if there any special Qemu configuration or another thing necessary to reproduce this issue and drm_client_buffer_vunmap?
>
> I generated three different .c (-collide, - threaded and one without any special option) from the syz-reproducer but none of them reproduce this issue. In fact, not a single message in dmesg shows up for this particular issue + reproducer.
>
> Thanks,

+lkml

Hi Igor,

Both of these happened on GCE VMs, so there are no qemu flags per se.
If this depends on exact hardware and you want to recreate the
environment, you need to create a GCE VM with EnableDisplay property.



> On Wednesday, March 10, 2021 at 11:47:10 AM UTC-3 syzbot wrote:
>>
>> Hello,
>>
>> syzbot has tested the proposed patch but the reproducer is still triggering an issue:
>> memory leak in drm_vma_node_allow
>>
>> 2021/03/10 14:46:00 executed programs: 132
>> BUG: memory leak
>> unreferenced object 0xffff8881256ee280 (size 64):
>> comm "syz-executor.7", pid 11116, jiffies 4294949693 (age 16.450s)
>> hex dump (first 32 bytes):
>> 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>> 00 00 00 00 00 00 00 00 00 0c 75 24 81 88 ff ff ..........u$....
>> backtrace:
>> [<000000001044f41c>] kmalloc include/linux/slab.h:554 [inline]
>> [<000000001044f41c>] drm_vma_node_allow+0x32/0x120 drivers/gpu/drm/drm_vma_manager.c:274
>> [<0000000039cdfb89>] drm_gem_handle_create_tail+0x107/0x250 drivers/gpu/drm/drm_gem.c:390
>> [<0000000069546020>] vgem_gem_create drivers/gpu/drm/vgem/vgem_drv.c:203 [inline]
>> [<0000000069546020>] vgem_gem_dumb_create+0x8d/0x240 drivers/gpu/drm/vgem/vgem_drv.c:223
>> [<000000005a419bcc>] drm_mode_create_dumb+0x121/0x150 drivers/gpu/drm/drm_dumb_buffers.c:96
>> [<00000000c7d2aa9d>] drm_ioctl_kernel+0xf0/0x160 drivers/gpu/drm/drm_ioctl.c:787
>> [<00000000e3de4c3c>] drm_ioctl+0x2c8/0x4c0 drivers/gpu/drm/drm_ioctl.c:887
>> [<00000000c6de34af>] vfs_ioctl fs/ioctl.c:48 [inline]
>> [<00000000c6de34af>] __do_sys_ioctl fs/ioctl.c:753 [inline]
>> [<00000000c6de34af>] __se_sys_ioctl fs/ioctl.c:739 [inline]
>> [<00000000c6de34af>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:739
>> [<0000000017fb1e54>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
>> [<00000000267c1811>] entry_SYSCALL_64_after_hwframe+0x44/0xae
>>
>>
>>
>> Tested on:
>>
>> commit: 05a59d79 Merge git://git.kernel.org:/pub/scm/linux/kernel/..
>> git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ master
>> console output: https://syzkaller.appspot.com/x/log.txt?x=16a93152d00000
>> kernel config: https://syzkaller.appspot.com/x/.config?x=7f272e2e8f44941a
>> dashboard link: https://syzkaller.appspot.com/bug?extid=04639d98c75c52e41b8a
>> compiler:
>>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/b0e69e38-f037-4823-a12b-82680c9494den%40googlegroups.com.