Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2223034pxu; Fri, 18 Dec 2020 08:13:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAdSTgWt/Okw+ePzWUI69Fr7VXX/D87dTj1Ic4+uPvHgbY+ZThXWeHhfO2C9dGRFjmv7gw X-Received: by 2002:a17:906:a0c3:: with SMTP id bh3mr4703009ejb.497.1608308025116; Fri, 18 Dec 2020 08:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608308025; cv=none; d=google.com; s=arc-20160816; b=oBoyP+2KfX4rqs3tXMpEJnSB80AvjwmNz/CPDuUIIsO6lGU7NPTVUvn+1crsKQJrM0 luasckg0GWF/BJSW4JjlHAlDCCAS8pWDRFxH9yQYSurjMzyEktU3RVeMKQlG45fDSKAC AfFCgUvjqUqh4X7nL1PVJVhZLpiClJwS9UvvOaO5xPXN9miW9pcGvG60qvXHr8Rnd4tD 44LE0H8FZb8tL7FmJtu460L9XLSsUU/1KHbjA3J80HEOTkT0NuYVfRr1ULspJed09kpv BMf0GDMRlOq3hsojakkBjX9EaCtmkFkrZuqUzBCG/8Tbh2Ph2qAnJmnhwdLaDw/QWKa7 VucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=wSnd9CzmgYJRErcDDKWGCdIBJ+J2dW7oIpYsX0eFHvM=; b=mdnw8y7hmhqxlHFrY+qFL6zJ09KipwSK6Y9rLbcsSm2Tjvg29upgxufpcsaUNKzSbQ A2sRKyl38zmrbvp2gttQhsXTD6iYyya5ueHCFfYqlinM9nrw1k7XQe6qg2FmOsLxFS2M czHS7vwwUVbIFaFm6sB7Axi59dRdOQssV1LeUXPRsZYiQEpXGtuGs2OWCJ3PKloQVGvC cmsx/I7ywa6o3qZtEUsKGCnFqhWKFXVvRyxEMgKieYLKcfySOOtAI6KnptEc5A1pQHZl orvSgTBp4wJ944l8gNblzZxFaGI9rgJqiWp/+MN/xybG06qWPzYXXEpqQrSU5zz7GkSe Tchw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si6512783edg.295.2020.12.18.08.13.22; Fri, 18 Dec 2020 08:13:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731104AbgLRQLP (ORCPT + 99 others); Fri, 18 Dec 2020 11:11:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:40668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730940AbgLRQLO (ORCPT ); Fri, 18 Dec 2020 11:11:14 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E453C23B6C; Fri, 18 Dec 2020 16:10:32 +0000 (UTC) Date: Fri, 18 Dec 2020 11:10:31 -0500 From: Steven Rostedt To: Daniel Vetter Cc: "Paul E. McKenney" , syzbot , Josh Triplett , rcu@vger.kernel.org, Bartlomiej Zolnierkiewicz , dri-devel , Geert Uytterhoeven , "Gustavo A. R. Silva" , Linux Fbdev development list , Linux Kernel Mailing List , Nathan Chancellor , Peter Rosin , Tetsuo Handa , syzkaller-bugs Subject: Re: WARNING: suspicious RCU usage in modeset_lock Message-ID: <20201218111031.226f8b59@gandalf.local.home> In-Reply-To: References: <000000000000cb6db205b68a971c@google.com> <20201216161621.GH2657@paulmck-ThinkPad-P72> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Dec 2020 11:03:20 +0100 Daniel Vetter wrote: > I think we're tripping over the might_sleep() all the mutexes have, > and that's not as good as yours, but good enough to catch a missing > rcu_read_unlock(). That's kinda why I'm baffled, since like almost > every 2nd function in the backtrace grabbed a mutex and it was all > fine until the very last. > > I think it would be really nice if the rcu checks could retain (in > debugging only) the backtrace of the outermost rcu_read_lock, so we > could print that when something goes wrong in cases where it's leaked. > For normal locks lockdep does that already (well not full backtrace I > think, just the function that acquired the lock, but that's often > enough). I guess that doesn't exist yet? > > Also yes without reproducer this is kinda tough nut to crack. I'm looking at drm_client_modeset_commit_atomic(), where it triggered after the "retry:" label, which to get to, does a bit of goto spaghetti, with a -EDEADLK detected and a goto backoff, which calls goto retry, and then the next mutex taken is the one that triggers the bug. As this is hard to reproduce, but reproducible by a fuzzer, I'm guessing there's some error return path somewhere in there that doesn't release an rcu_read_lock(). -- Steve