From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E122EC43387 for ; Thu, 3 Jan 2019 08:56:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B797120883 for ; Thu, 3 Jan 2019 08:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730412AbfACIz7 (ORCPT ); Thu, 3 Jan 2019 03:55:59 -0500 Received: from mga14.intel.com ([192.55.52.115]:44139 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730400AbfACIz4 (ORCPT ); Thu, 3 Jan 2019 03:55:56 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jan 2019 00:55:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,434,1539673200"; d="scan'208";a="113827569" Received: from kpriedit-mobl.ger.corp.intel.com (HELO [10.252.54.192]) ([10.252.54.192]) by fmsmga008.fm.intel.com with ESMTP; 03 Jan 2019 00:55:54 -0800 Subject: Re: WARNING: lock held when returning to user space in set_property_atomic To: syzbot , airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, maxime.ripard@bootlin.com, sean@poorly.run, syzkaller-bugs@googlegroups.com References: <000000000000f56975057e374c46@google.com> From: Maarten Lankhorst Message-ID: Date: Thu, 3 Jan 2019 09:55:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <000000000000f56975057e374c46@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Op 30-12-2018 om 07:21 schreef syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:    903b77c63167 Merge tag 'linux-kselftest-4.21-rc1' of git:/.. > git tree:       upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12d0f553400000 > kernel config:  https://syzkaller.appspot.com/x/.config?x=53a2f2aa0b1f7606 > dashboard link: https://syzkaller.appspot.com/bug?extid=6ea337c427f5083ebdf2 > compiler:       gcc (GCC) 8.0.1 20180413 (experimental) > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=120d906f400000 > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1024673b400000 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com > > RBP: 00007ffe369ca7a0 R08: 0000000000000001 R09: 00000000004009ce > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 > R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000000 > > ================================================ > WARNING: lock held when returning to user space! > 4.20.0+ #174 Not tainted > ------------------------------------------------ > syz-executor556/8153 is leaving the kernel with locks still held! > 1 lock held by syz-executor556/8153: >  #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at: set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462 > > > --- > This bug is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkaller@googlegroups.com. > > syzbot will keep track of this bug report. See: > https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with syzbot. > syzbot can test patches for this bug, for details see: > https://goo.gl/tpsmEJ#testing-patches Just guessing.. Does this help? ----- diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index cd9bc0ce9be0..004191d01772 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -459,11 +459,11 @@ static int set_property_atomic(struct drm_mode_object *obj, struct drm_modeset_acquire_ctx ctx; int ret; - drm_modeset_acquire_init(&ctx, 0); - state = drm_atomic_state_alloc(dev); if (!state) return -ENOMEM; + + drm_modeset_acquire_init(&ctx, 0); state->acquire_ctx = &ctx; retry: if (prop == state->dev->mode_config.dpms_property) {