From: Daniel Vetter <daniel@ffwll.ch>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
LKML <linux-kernel@vger.kernel.org>,
Kostya Serebryany <kcc@google.com>,
syzkaller <syzkaller@googlegroups.com>,
Alexander Potapenko <glider@google.com>
Subject: Re: dri: WARNING in idr_remove
Date: Mon, 29 Aug 2016 08:01:12 +0200 [thread overview]
Message-ID: <20160829060112.GE10980@phenom.ffwll.local> (raw)
In-Reply-To: <CACT4Y+ZTCc7+Dorvf-oyW9XY5QRYPzJzZ5OnK-NtrLSdHX9OCw@mail.gmail.com>
On Sun, Aug 28, 2016 at 04:32:55PM +0200, Dmitry Vyukov wrote:
> Hello,
>
> The following program causes a WARNING in idr_remove:
Again under the assumption that you're running this with the vgem driver:
linux-next has it fixed.
-Daniel
>
> ------------[ cut here ]------------
> WARNING: CPU: 3 PID: 26766 at lib/idr.c:505
> idr_remove called for id=1 which is not allocated.
> CPU: 3 PID: 26766 Comm: syz-executor Not tainted 4.8.0-rc3+ #33
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> ffffffff884b8280 ffff8800634878d8 ffffffff82d1b239 ffffffff01fc0000
> fffffbfff1097050 ffffffff86e8eec0 ffff8800634879b0 ffffffff8723b400
> dffffc0000000000 0000000000000009 ffff8800634879a0 ffffffff816ab4e3
> Call Trace:
> [<ffffffff813809bc>] warn_slowpath_fmt+0xac/0xd0 kernel/panic.c:532
> [< inline >] idr_remove_warning lib/idr.c:505
> [<ffffffff82d1e5c7>] idr_remove+0x617/0x830 lib/idr.c:559
> [<ffffffff8340761d>] drm_legacy_ctxbitmap_free+0x9d/0xd0
> drivers/gpu/drm/drm_context.c:61
> [<ffffffff834090ae>] drm_legacy_rmctx+0x30e/0x410
> drivers/gpu/drm/drm_context.c:496
> [<ffffffff83410a5c>] drm_ioctl+0x7bc/0xc60 drivers/gpu/drm/drm_ioctl.c:724
> [< inline >] vfs_ioctl fs/ioctl.c:43
> [<ffffffff8186f1fc>] do_vfs_ioctl+0x18c/0x1080 fs/ioctl.c:675
> [< inline >] SYSC_ioctl fs/ioctl.c:690
> [<ffffffff8187017f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:681
> [<ffffffff810088ff>] do_syscall_64+0x1df/0x640 arch/x86/entry/common.c:288
> [<ffffffff86c25543>] entry_SYSCALL64_slow_path+0x25/0x25
> arch/x86/entry/entry_64.S:248
>
>
> // autogenerated by syzkaller (http://github.com/google/syzkaller)
> #include <stdint.h>
> #include <stdio.h>
> #include <sys/syscall.h>
> #include <unistd.h>
>
> int main()
> {
> syscall(__NR_mmap, 0x20000000ul, 0xc000ul, 0x3ul,
> 0x32ul, -1, 0x0ul, 0, 0, 0);
> int fd = open("/dev/dri/card0", 0x101102ul, 0);
> *(uint32_t*)0x2000b000 = (uint32_t)0x2;
> *(uint64_t*)0x2000b008 = (uint64_t)0x2000b000;
> syscall(__NR_ioctl, fd, 0xc0106426ul, 0x2000b000ul);
> int res = *(uint32_t*)0x2000b000;
> *(uint32_t*)0x2000bff8 = res;
> *(uint32_t*)0x2000bffc = (uint32_t)0x2;
> syscall(__NR_ioctl, fd, 0xc0086421ul, 0x2000bff8ul);
> return 0;
> }
>
> On commit 61c04572de404e52a655a36752e696bbcb483cf5 (Aug 25).
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2016-08-29 6:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-28 14:32 Dmitry Vyukov
2016-08-29 6:01 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160829060112.GE10980@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®