Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1368450pxb; Wed, 10 Feb 2021 06:58:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJz61udOJsXddRIzGK9ZP9Xuow2m23vx1zltaGnYU57viD2bRGRlrXGCNB2fNGUauvKrYYWR X-Received: by 2002:a17:907:77cb:: with SMTP id kz11mr3204819ejc.12.1612969111105; Wed, 10 Feb 2021 06:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612969111; cv=none; d=google.com; s=arc-20160816; b=GDCp/8Du77z5SyMLQS2zzTrxuBqwi158pvEMDSZTR93pI1WOya+sZPfLe9bdpbymq1 vXlIOMp+PMIU2dKz22zygeZcC+JMGBXxLEWoL8mjtjHOly3zQoDMyqBMVTGXHz9lzApL /d4j0pd0lyW23ON84/gAJV6ZX/v/WWNa/xwXtf2o7zHUrfLWQ3loyTkIhYH71geylMLT mGNQa8Dv9ZZS7P5M6NsQNjYd5BVKgReivW7Vp8J5f7DrY0GkesHCMutPsKh2N5/38hMd 1uXqMXvXNJo42Ac+g5bRnA1bs4bGO6hyICiOLrApk8qpKoedmqzndNWVcCHEFgtHGcm2 zGeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=YEN57to/P25Ku97YjZ4aFRlnJ6z2XKsNNppzA3hWDpg=; b=tJo3CZC3Hp+xWJ2bYYKZKdKRHP2FDL1yszA2KL8fKxI4JTegA0HXw35KxbjgZ1lCZg XfqshbtqcdoyelKcoCfgaa9VispxRry8xIAsN+PWnMXteP4dirj8HT5sY7C6+c+KyUdg imxWu6v/znKmF0oBmUXv0Paf/GrpZNlC7C/ce5XerjHuS4qtcV2TjxixGm2xjvvSCh5w u04BydYNiCfYistXnMRZnVhjI4k8tkbO6A/06+MVfWsdGFF8ZFBqGrxl71CvQl7v9YT/ E4YiXus/vJbZf5OBbTy6CuvdETgdj6MiJnIkdlLxZdqh9YIH7fgFwGLKS4M66atgfh51 CYpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a67si1595061edf.198.2021.02.10.06.58.06; Wed, 10 Feb 2021 06:58:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230028AbhBJO53 (ORCPT + 99 others); Wed, 10 Feb 2021 09:57:29 -0500 Received: from mga06.intel.com ([134.134.136.31]:61841 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbhBJO52 (ORCPT ); Wed, 10 Feb 2021 09:57:28 -0500 IronPort-SDR: fdi66C2t2dwZ+/gK89fEmj+UDUTi2DXFcfhCJjwRHYOA31yWZm9NE5q0zc/9SAKmdnenIji15c gQitbFoMJv8g== X-IronPort-AV: E=McAfee;i="6000,8403,9890"; a="243575327" X-IronPort-AV: E=Sophos;i="5.81,168,1610438400"; d="scan'208";a="243575327" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2021 06:56:42 -0800 IronPort-SDR: Uv/sQUYf46bgYDKfel7rXV+9Fn8OF1Z98xSc8zWQy6IB7TB+HDS3Q5dLxFo8a9fCUlIDvQQ7Lp lbLsyioiTD4g== X-IronPort-AV: E=Sophos;i="5.81,168,1610438400"; d="scan'208";a="421074065" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2021 06:56:40 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l9quz-003klX-JR; Wed, 10 Feb 2021 16:56:37 +0200 Date: Wed, 10 Feb 2021 16:56:37 +0200 From: Andy Shevchenko To: "Song Bao Hua (Barry Song)" Cc: luojiaxing , Linus Walleij , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , "linuxarm@openeuler.org" Subject: Re: [Linuxarm] Re: [PATCH for next v1 0/2] gpio: few clean up patches to replace spin_lock_irqsave with spin_lock Message-ID: References: <1612774577-55943-1-git-send-email-luojiaxing@huawei.com> <2b8001bb-0bcd-3fea-e15c-2722e7243209@huawei.com> <1a5dfcf2-11a2-f549-782d-447d58e21305@huawei.com> <947bcef0d56a4d0c82729d6899394f4a@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <947bcef0d56a4d0c82729d6899394f4a@hisilicon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 11:50:45AM +0000, Song Bao Hua (Barry Song) wrote: > > -----Original Message----- > > From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] > > Sent: Wednesday, February 10, 2021 11:51 PM > > On Wed, Feb 10, 2021 at 5:43 AM luojiaxing wrote: > > > On 2021/2/9 17:42, Andy Shevchenko wrote: ... > > > Between IRQ handler A and IRQ handle A, it's no need for a SLIS. > > > > Right, but it's not the case in the patches you provided. > > The code still holds spin_lock. So if two cpus call same IRQ handler, > spin_lock makes them spin; and if interrupts are threaded, spin_lock > makes two threads run the same handler one by one. If you run on an SMP system and it happens that spin_lock_irqsave() just immediately after spin_unlock(), you will get into the troubles. Am I mistaken? I think this entire activity is a carefully crafted mine field for the future syzcaller and fuzzers alike. I don't believe there are no side effects in a long term on all possible systems and configurations (including forced threaded IRQ handlers). I would love to see a better explanation in the commit message of such patches which makes it clear that there are *no* side effects. For time being, NAK to the all patches of this kind. -- With Best Regards, Andy Shevchenko