kernel-testers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas@shipmail.org>
To: Eric Anholt <eric@anholt.net>
Cc: Kernel Testers List <kernel-testers@vger.kernel.org>,
	Dave Airlie <airlied@linux.ie>,
	"Michael S. Tsirkin" <m.s.tsirkin@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	dri-devel@lists.sourceforge.net
Subject: Re: [Bug #12574] possible circular locking dependency detected
Date: Wed, 11 Feb 2009 08:10:58 +0100	[thread overview]
Message-ID: <49927A02.9020006@shipmail.org> (raw)
In-Reply-To: <1234305716.32506.10.camel@gaiman>

Eric Anholt wrote:
> On Wed, 2009-02-11 at 00:37 +0200, Michael S. Tsirkin wrote:
>   
>> Dave, dri guys,
>> Could you take a look at this circular dependency please (below)?  I
>> observe it when suspending laptop with radeon drm loaded and with
>> lockdep enabled. It seems that the root of the problem is that
>> various vm ops such as drm_vm_open, drm_mmap) are called with mm
>> semaphore taken, and take dev->struct_mutex. On the other hand,
>> drm_rmmap_locked is called with dev->struct_mutex, and calls mtrr_del
>> which depends on mm semaphore indirectly.
>>
>> What do you think?
>>     
>
> Yes, there are real lock inversions now due to the GTT mmap code.  It's
> going to be a pain to fix (I tried getting the mmap_sem -> struct_mutex
> path to go away, but the fact that mmap_sem is held over the fault
> handler pretty much kills that).  It's high on the list, though.
>   
Shouldn't it be possible to relax this given that in the fault() 
handler, the mmap_sem() is taken in read mode only. This means that it 
should be deadlock-safe (but still a little ugly) to take the mmap_sem() 
in read mode when the struct mutex is held.

Another quick way to fix potential deadlocks, would be to take the 
struct mutex in the following way in fault():

if (!mutex_trylock(&dev->struct_mutex)) {
      needs_resched();
      return VM_FAULT_NOPAGE;
}

/Thomas

>   
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> ------------------------------------------------------------------------
>
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>   




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
--

  reply	other threads:[~2009-02-11  7:10 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08 19:05 2.6.29-rc4: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-08 19:06 ` [Bug #12414] iwl4965 cannot use "ap auto" on latest 2.6.28/29? Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12419] possible circular locking dependency on i915 dma Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12418] Repeated ioctl(4, 0x40046445, ..) loop in glxgears Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12415] WARNING: at drivers/net/wireless/iwlwifi/iwl-sta.c:689 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12441] Xorg can't use dri on radeon X1950 AGP Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12491] i915 lockdep warning Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12444] X hangs following switch from radeonfb console - Bisected Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12496] swsusp cannot find resume device (sometimes) Rafael J. Wysocki
2009-02-09  0:38   ` Arjan van de Ven
     [not found]     ` <20090208163817.6a53d026-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2009-02-09  2:27       ` Greg KH
     [not found]         ` <20090209022700.GA10979-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2009-02-09 23:46           ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12497] new barrier warnings in 2.6.29-rc1 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12494] Sony backlight regression from 2.6.28 to 29-rc Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12499] Problem with using bluetooth adaper connected to usb port Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12503] [slab corruption] BUG key_jar: Poison overwritten Rafael J. Wysocki
2009-02-08 22:12   ` Ingo Molnar
     [not found]     ` <20090208221231.GA9160-X9Un+BFzKDI@public.gmane.org>
2009-02-09  0:40       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12501] build bug in eeepc-laptop.c Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12502] pipe_read oops on sh Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12508] "powerpc/pci: Reserve legacy regions on PCI" broke my G3 Rafael J. Wysocki
2009-02-08 23:38   ` Mikael Pettersson
     [not found]     ` <18831.27907.957902.357829-gq7oiAaKCbRt3AgVzhmPzw@public.gmane.org>
2009-02-09  0:39       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12551] end_request: I/O error, dev cciss/c0d0, sector 87435720 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12510] 2.6.29-rc2 dies on startup Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12571] Suspend-resume on Dell Latitude D410 newly broken in 2.6.29-rc* Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12604] Commit 31a12666d8f0c22235297e1c1575f82061480029 slows down Berkeley DB Rafael J. Wysocki
2009-02-10 16:28   ` Jan Kara
     [not found]     ` <20090210162830.GD12146-MqCa7tSQB4jjFM9bn6wA6Q@public.gmane.org>
2009-02-12  1:47       ` Nick Piggin
     [not found]         ` <20090212014718.GF30043-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2009-02-12  2:02           ` Linus Torvalds
     [not found]             ` <alpine.LFD.2.00.0902111757030.3189-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-02-12  3:34               ` Nick Piggin
     [not found]                 ` <20090212033423.GC23790-B4tOwbsTzaBolqkO4TVVkw@public.gmane.org>
2009-02-12 14:32                   ` Jan Kara
2009-02-14 14:29   ` Theodore Tso
     [not found]     ` <20090214142915.GE26628-L/UBWM/4G/zhXIiyNabO3w@public.gmane.org>
2009-02-14 19:53       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12600] i915 lockdep warning Rafael J. Wysocki
2009-02-09  1:12   ` Roland Dreier
     [not found]     ` <adaljsgbeh6.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-02-09 17:21       ` Bob Copeland
2009-02-08 19:21 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-02-09 13:59   ` Michael S. Tsirkin
2009-02-10 22:37   ` Michael S. Tsirkin
     [not found]     ` <20090210223711.GA6809-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2009-02-10 22:41       ` Eric Anholt
2009-02-11  7:10         ` Thomas Hellström [this message]
2009-02-08 19:21 ` [Bug #12609] v2.6.29-rc2 libata sff 32bit PIO regression Rafael J. Wysocki
2009-02-09 10:25   ` Hugh Dickins
2009-02-08 19:21 ` [Bug #12610] sync-Regression in 2.6.28.2? Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12606] fb_mmap: circular locking dependency on hibernation Rafael J. Wysocki
2009-02-08 22:00   ` Andrea Righi
     [not found]     ` <498F55F1.3000405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-08 22:06       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression Rafael J. Wysocki
2009-02-09 10:24   ` Hugh Dickins
2009-02-08 19:21 ` [Bug #12617] unable to compile e100 firmware into kernel Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12613] [Suspend regression][DRM, RADEON] Rafael J. Wysocki
2009-02-08 22:07   ` etienne
     [not found]     ` <498F5785.3000009-Bf/eaXMDFuuXqB7oj33eUg@public.gmane.org>
2009-02-08 22:11       ` Rafael J. Wysocki
2009-02-09  2:26       ` Dave Airlie
     [not found]         ` <21d7e9970902081826r48777cb8s8c4e882a02575c71-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-09 18:08           ` etienne
2009-02-09 19:31           ` etienne
2009-02-09  5:50     ` Soeren Sonnenburg
2009-02-08 19:21 ` [Bug #12615] boot hangs while bringing up gianfar ethernet Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12649] Early crash with 2.6.29-rc3 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12618] hackbench [pthread mode] regression " Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12656] iwl3945 broken after hibernation: Wait for START_ALIVE timeout after 2000ms Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12650] Strange load average and ksoftirqd behavior with 2.6.29-rc2-git1 Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12661] commit 64ff3b938ec6782e6585a83d5459b98b0c3f6eb8 breaks rlogin Rafael J. Wysocki
2009-02-09  4:23   ` Herbert Xu
     [not found]     ` <20090209042307.GA3268-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2009-02-14 22:35       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12660] Linux 2.6.28.3 freezing on a 32-bits x86 Thinkpad T43p Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12659] Failure to resume two Sandisk USB flash drives attached to a Belkin USB Busport Mobile (F5U022) Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12662] linux 2.6.29-rc3 kernel failure with mptsas Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12663] Commit 8c7e58e690ae60ab4215b025f433ed4af261e103 breaks resume Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12667] Badness at kernel/time/timekeeping.c:98 in pmud (timekeeping_suspended) Rafael J. Wysocki
2009-02-09  7:53   ` Paul Collins
     [not found]     ` <878wognj00.fsf-D7l3p2TGOOdLdt5/z87VRY6ehsQQaF5K@public.gmane.org>
2009-02-09  9:18       ` Ingo Molnar
2009-02-14 22:42       ` Rafael J. Wysocki
     [not found]         ` <200902142342.59186.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-16  7:17           ` Paul Collins
     [not found]             ` <87hc2u26m5.fsf-D7l3p2TGOOdLdt5/z87VRY6ehsQQaF5K@public.gmane.org>
2009-02-16  9:10               ` Benjamin Herrenschmidt
2009-02-16 10:47                 ` Paul Collins
     [not found]                   ` <87d4di1wwr.fsf-D7l3p2TGOOdLdt5/z87VRY6ehsQQaF5K@public.gmane.org>
2009-02-19  8:27                     ` Paul Collins
     [not found]                       ` <87r61uzv95.fsf-D7l3p2TGOOdLdt5/z87VRY6ehsQQaF5K@public.gmane.org>
2009-02-19  8:38                         ` Benjamin Herrenschmidt
2009-02-19 13:00                           ` Rafael J. Wysocki
     [not found]                             ` <200902191400.53528.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-19 21:47                               ` Benjamin Herrenschmidt
2009-02-19 22:08                                 ` Rafael J. Wysocki
2009-02-19 20:17                           ` Thomas Gleixner
     [not found]                             ` <alpine.LFD.2.00.0902192114150.3523-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-02-19 21:23                               ` Rafael J. Wysocki
2009-02-19 21:51                               ` Benjamin Herrenschmidt
2009-02-22 19:31                                 ` Thomas Gleixner
     [not found]                                   ` <alpine.LFD.2.00.0902222026410.3523-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-02-22 20:46                                     ` Benjamin Herrenschmidt
2009-02-09 10:32   ` Thomas Gleixner
2009-02-08 19:21 ` [Bug #12668] USB flash disk surprise disconnect Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12666] Build failure with latest -git: btrfs on ppc64 Rafael J. Wysocki
2009-02-08 21:53   ` Kyle McMartin
2009-02-08 22:08     ` Rafael J. Wysocki
     [not found]       ` <200902082308.14366.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-10 20:00         ` Chuck Ebbert
2009-02-08 19:21 ` [Bug #12664] viafb triggers BUG at mm/vmalloc.c:294 Rafael J. Wysocki
2009-02-09 10:17   ` wixor
     [not found]     ` <c43b2e150902090217p6efe5141q4b3a608a00c02f71-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-14 22:39       ` Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12671] uvc_status_cleanup(): undefined reference to `input_unregister_device' Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12669] 2.6.28.4 regression: mmap fails if mlockall used Rafael J. Wysocki
2009-02-09 10:32   ` Hugh Dickins
2009-02-08 19:21 ` [Bug #12670] BUG: unable to handle kernel paging request at pin_to_kill+0x21 Rafael J. Wysocki
2009-02-08 21:55 ` 2.6.29-rc4: Reported regressions from 2.6.28 Linus Torvalds
     [not found]   ` <alpine.LFD.2.00.0902081354150.3048-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-02-08 22:04     ` Rafael J. Wysocki
2009-02-09  7:36 ` Stefan Richter
  -- strict thread matches above, loose matches on Subject: below --
2009-04-06 18:54 2.6.29-git13: " Rafael J. Wysocki
2009-04-06 19:05 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-03-21 16:28 2.6.29-rc8-git5: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-21 16:39 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-03-14 19:01 2.6.29-rc8: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-14 19:05 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-03-16  0:24   ` Michael S. Tsirkin
2009-03-19 13:03     ` Rafael J. Wysocki
2009-03-03 19:22 2.6.29-rc6-git7: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-03-03 19:25 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-03-03 22:19   ` Michael S. Tsirkin
     [not found]     ` <8f53421d0903031419m493b88bbifa911323279f4f0b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-03 22:42       ` Rafael J. Wysocki
     [not found]         ` <200903032342.36851.rjw-KKrjLPT3xs0@public.gmane.org>
2009-03-04 23:32           ` Michael S. Tsirkin
2009-02-23 21:45 2.6.29-rc6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-23 21:48 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-02-14 20:35 2.6.29-rc5: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-14 20:38 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-02-04 10:21 2.6.29-rc3-git6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki

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=49927A02.9020006@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=eric@anholt.net \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.s.tsirkin@gmail.com \
    --cc=rjw@sisk.pl \
    /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;
as well as URLs for NNTP newsgroup(s).