Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932284AbeAKI2R (ORCPT + 1 other); Thu, 11 Jan 2018 03:28:17 -0500 Received: from verein.lst.de ([213.95.11.211]:51461 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbeAKI2P (ORCPT ); Thu, 11 Jan 2018 03:28:15 -0500 Date: Thu, 11 Jan 2018 09:28:13 +0100 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/32] fs: introduce new ->get_poll_head and ->poll_mask methods Message-ID: <20180111082813.GA760@lst.de> References: <20180110155853.32348-1-hch@lst.de> <20180110155853.32348-4-hch@lst.de> <20180110210416.GH13338@ZenIV.linux.org.uk> <20180111052200.GJ13338@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180111052200.GJ13338@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 05:22:00AM +0000, Al Viro wrote: > Whee... The very first ->poll() instance in alphabetic order on pathnames: > in arch/cris/arch-v10/drivers/gpio.c > > static __poll_t gpio_poll(struct file *file, poll_table *wait) > { > __poll_t mask = 0; > struct gpio_private *priv = file->private_data; > unsigned long data; > unsigned long flags; > > spin_lock_irqsave(&gpio_lock, flags); > > poll_wait(file, &priv->alarm_wq, wait); > > IOW, we are doing poll_wait() (== possible GFP_KERNEL __get_free_page()) under > a spinlock... Yes. Another god reason to separate poll_wait and the actual event check callback..