From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD423C7113E for ; Fri, 18 Aug 2023 10:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376333AbjHRKfh (ORCPT ); Fri, 18 Aug 2023 06:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376545AbjHRKej (ORCPT ); Fri, 18 Aug 2023 06:34:39 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBFD12D58; Fri, 18 Aug 2023 03:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692354852; x=1723890852; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Y9fRMegnJMWJ+p+ZMRt191P/MQhxDL+ApZBYzyhbABc=; b=c0EPAh2pkmhtT/4VCQH0Wr3tDowpO/7OPWTA/NqAlIfIOx7fLgKPlIRA HT1owZUscKEG5czHbUNurtXjT8WZAPrNcooBvfHkXq1vijQU/m+7mPbmh 7SmMdUIXgmFiJ5TWdQAFcKnRtA7aeRvCgX3stVg5zqOnjjvCP+RjEUBAJ DKPTuB1htg29yHy+Nvaafmigc3W3Mr6bbFpBIlG9sXqGXROFNcUngI2vV vSdRt5eo8w4ykkaPnk5fdLex3tNVsQI2LNmm7NDiw6rXKM/D1i8vDSSRi pHSZPjIMLLEIyVdRjGF/6uIK2KVv/dH/IHANIpONXLNi6J7+dNoeYN95L A==; X-IronPort-AV: E=McAfee;i="6600,9927,10805"; a="439450172" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="439450172" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2023 03:34:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10805"; a="711953384" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="711953384" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2023 03:34:10 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qWwnx-003stx-0R; Fri, 18 Aug 2023 13:34:09 +0300 Date: Fri, 18 Aug 2023 13:34:08 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Linus Walleij , Kent Gibson , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v2 0/6] gpio: cdev: bail out of poll() if the device goes down Message-ID: References: <20230817184958.25349-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230817184958.25349-1-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 17, 2023 at 08:49:52PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Wake up all three wake queues (the one associated with the character > device file, the one for V1 line events and the V2 line request one) > when the underlying GPIO device is unregistered. This way we won't get > stuck in poll() after the chip is gone as user-space will be forced to > go back into a new system call and will see that gdev->chip is NULL. Why can't you use the global device unbind notifications and filter out what you are interested in? -- With Best Regards, Andy Shevchenko