From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Skeggs Subject: Re: GEM - radeon cs ioctl deadlock Date: Thu, 14 Oct 2010 11:47:19 +1000 Message-ID: <1287020839.812.2.camel@nisroch> References: <1287008098.4928.9.camel@clockmaker-el6> Reply-To: skeggsb@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qw0-f49.google.com (mail-qw0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 391099E937 for ; Wed, 13 Oct 2010 18:47:52 -0700 (PDT) Received: by qwj8 with SMTP id 8so3395383qwj.36 for ; Wed, 13 Oct 2010 18:47:51 -0700 (PDT) In-Reply-To: <1287008098.4928.9.camel@clockmaker-el6> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, 2010-10-14 at 08:14 +1000, Dave Airlie wrote: > On Wed, 2010-10-13 at 17:57 -0400, Jerome Glisse wrote: > > So we are facing a deadlock with the radeon cs ioctl. When a buffer is given > > a name (with flink) we could endup with 2 handle pointing to the same > > object (flink object and open it from same file descriptor). Would it be ok > > if i change gem open to first look if we already have an handle for the > > object and to use that handle instead of creating a new one ? Or could > > this break intel driver ? > > I think r300g worked around this already, maybe we should just avoid > doing it from userspace if possible. We had this in nouveau at some point. In the end, I prevented the deadlock from occuring by checking that a process doesn't reserve the same buffer twice (we store file_priv in a reserved_by field in the bo as we reserve the buffers), and then just fixed userspace. Ben. > > Dave. > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel