Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755927AbaJHK2J (ORCPT ); Wed, 8 Oct 2014 06:28:09 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:55112 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755567AbaJHK2G (ORCPT ); Wed, 8 Oct 2014 06:28:06 -0400 Content-Type: text/plain; charset=UTF-8 From: Ian Munsie To: Michael Neuling Cc: greg , arnd , mpe , benh , anton , linux-kernel , linuxppc-dev , jk , cbe-oss-dev , "Aneesh Kumar K.V" Subject: Re: [PATCH v4 13/16] cxl: Driver code for powernv PCIe based cards for userspace access In-reply-to: <1412758505-23495-14-git-send-email-mikey@neuling.org> References: <1412758505-23495-1-git-send-email-mikey@neuling.org> <1412758505-23495-14-git-send-email-mikey@neuling.org> Date: Wed, 08 Oct 2014 21:28:05 +1100 Message-Id: <1412763264-sup-2737@delenn.ozlabs.ibm.com> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14100810-1618-0000-0000-00000103060F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Michael Neuling's message of 2014-10-08 19:55:02 +1100: > +static ssize_t afu_read(struct file *file, char __user *buf, size_t count, > + loff_t *off) ... > + for (;;) { > + prepare_to_wait(&ctx->wq, &wait, TASK_INTERRUPTIBLE); > + if (ctx_event_pending(ctx)) > + break; > + > + spin_unlock_irqrestore(&ctx->lock, flags); > + if (file->f_flags & O_NONBLOCK) > + return -EAGAIN; > + > + if (signal_pending(current)) > + return -ERESTARTSYS; Looks like I mucked this up while refactoring - these two cases no longer call finish_wait() which can lead to a crash if something later wakes up the ctx->wq... I'll post a fix in a separate patch shortly. -Ian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/