Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1785263ybj; Sun, 22 Sep 2019 11:53:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWuVBCUcaOT+1D8bp9b5GIqSj1j9JVY3mrmOD852lHJks2UWSokEVfUXOzguReE+K06wah X-Received: by 2002:a17:906:9381:: with SMTP id l1mr21828805ejx.93.1569178387612; Sun, 22 Sep 2019 11:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569178387; cv=none; d=google.com; s=arc-20160816; b=mls8SD+HXQSb7jP0Fw3IK8Udc3lypE23W/+dtj8lVEbhT2y9uP/af1KgCKjGwgTqsi pMMFH5YvKGpvW5zR5xLpXHIkAiAfBXmTSHHvxVWFOkzCxvJ+h9t4oeo/xDUovzw3ctA2 aya/wDSyw3O15APuVo4mMcoS1If82q63RKWI4IhydELBl4/vpEsQEdOtefL84dB1ZInX nhqNjRw16UKPpMRtQzWiq4X7Pc8WWW1qlhsi50lcceHSxzsVJM6Gn1zzldlXELKMNYDs eYF75x00zbNoYqF0MYDhNf/BiK5bd+FWHywuYxqav67/jjJ9GCm9jwYaW+8xThGar3eS 9Tmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=c29uHkE2PgO68dBPp74p3GXp/wDQwcGtvvacHCD+nH4=; b=sX4o704Y0KIXT/rET9GL7/WQfdjO8k27ikgXXQ67ffZ37GAuHA+gvKpJyfteF2DWmR ZXL3lsU5mJ7lTTWMcAYT/Kg0Ydks2pjssM40y1gHjE+lwH/OVQ36u/yq7w7XOaBHebbu OVm2g/r5SxsI+awRwN4xBjODz3BeZTduHAClup6bmjLPYIncP4XdQh/oOLQfqgt6p1pm TlO3zvNFWiNj4QyiSM8dmrKYYein1dl/y+M5WEODG8N6x9B86DoTjmGkn+jKvTdEbHyv 0SJyC7ZICnH6z6ZseAbjeE/iyPaANsxaDm5rg1iM5vgveGTgvGtfln9U8VlGU1suv2eO TfdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34si5866876edb.439.2019.09.22.11.52.44; Sun, 22 Sep 2019 11:53:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391509AbfITQHa (ORCPT + 99 others); Fri, 20 Sep 2019 12:07:30 -0400 Received: from foss.arm.com ([217.140.110.172]:46840 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390878AbfITQH3 (ORCPT ); Fri, 20 Sep 2019 12:07:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 49D5A337; Fri, 20 Sep 2019 09:07:29 -0700 (PDT) Received: from [10.1.197.61] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2BD5F3F575; Fri, 20 Sep 2019 09:07:28 -0700 (PDT) Subject: Re: [PATCH 3/3] genirq/irqdomain: Detect type race in irq_create_fwspec_mapping() To: "Sverdlin, Alexander (Nokia - DE/Ulm)" , Thomas Gleixner , "linux-kernel@vger.kernel.org" , Grant Likely Cc: Mark Brown , Jon Hunter , "Glavinic-Pecotic, Matija (EXT - DE/Ulm)" , "Adamski, Krzysztof (Nokia - PL/Wroclaw)" , "stable@vger.kernel.org" References: <20190912094343.5480-1-alexander.sverdlin@nokia.com> <20190912094343.5480-4-alexander.sverdlin@nokia.com> From: Marc Zyngier Organization: Approximate Message-ID: Date: Fri, 20 Sep 2019 17:07:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190912094343.5480-4-alexander.sverdlin@nokia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/09/2019 10:44, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > From: Alexander Sverdlin > > irq_create_fwspec_mapping() can race with itself during IRQ trigger type > configuration. Possible scenarios include: > > - Mapping exists, two irq_create_fwspec_mapping() running in parallel do > not detect type mismatch, IRQ remains configured with one of the > different trigger types randomly > - Second call to irq_create_fwspec_mapping() sees existing mapping just > created by first call, but earlier irqd_set_trigger_type() call races > with later irqd_set_trigger_type() => totally undetected, IRQ type > is being set randomly to either one or another type Is that an actual thing? Frankly, the scenario you're describing here seems to carry the hallmarks of a completely broken system. Can you point at a system supported in mainline that would behave as such? Thanks, M. -- Jazz is not dead, it just smells funny...