From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] xf86drm.c: add counter for ioctl restarting Date: Fri, 13 Apr 2012 14:40:58 +0100 Message-ID: <1334324469_408990@CP5-2952> References: <20120413172642.4c423352@boyarsh.office.altlinux.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id C2374A0C32 for ; Fri, 13 Apr 2012 06:41:10 -0700 (PDT) In-Reply-To: <20120413172642.4c423352@boyarsh.office.altlinux.ru> 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: "Anton V. Boyarshinov" , DRI mailing list List-Id: dri-devel@lists.freedesktop.org On Fri, 13 Apr 2012 17:26:42 +0400, "Anton V. Boyarshinov" wrote: > In some cases ioclt->alarm->ioctl loop can be infinite: > ioctl(7, 0x40086482, 0xbfb62738) = ? ERESTARTSYS (To be restarted) > --- SIGALRM (Alarm clock) @ 0 (0) --- > sigreturn() = ? (mask now []) > ioctl(7, 0x40086482, 0xbfb62738) = ? ERESTARTSYS (To be restarted) > and forever. > > It seems, that limiting ioctl restarting by some resonable number of trys > is a dirty but working way to prevent Xorg lockups. And you have audited all callpaths to make sure that they can handle EINTR? Up until now it was part of the libdrm api that it did not return EINTR... >>From my naive pov, we could just fix the root cause of the bug rather than escalating the bug into a random failure. -Chris -- Chris Wilson, Intel Open Source Technology Centre