Received: by 10.223.185.116 with SMTP id b49csp3711633wrg; Tue, 6 Mar 2018 03:49:34 -0800 (PST) X-Google-Smtp-Source: AG47ELtuw1EuAC42nce6LMWSfDCcN8PF97rzs69tewoWiN+Q+BNuJHnEldNPm8bpCTq9K62SUv0d X-Received: by 10.98.166.200 with SMTP id r69mr18794325pfl.205.1520336974805; Tue, 06 Mar 2018 03:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520336974; cv=none; d=google.com; s=arc-20160816; b=e+MiEwcdToQ5QNYorDnvrlR2q80Mcy94C63MkKCYSavcXfqZVj/jD0CvoM/NGR29Eo L6olxOX4fpAU2hjcLzQDiRsdmOaibjJ8CS/LJFxklFtaWvsP7ilAypFeaZxvskNmkv3u X2dI6cKRw3dNp2nNJUN/uQQar7vMAhCyVufnXFOkS1tFNuPpbXiZOSKkc41THYqTlTiE +sj7imTVFKWQ0inofJX4yQc3gr/HvwUI0WQ9S55OXH6mvhyZOhRP4DnVb0lSZ3++942t +tTJIwc8rj6sEnYCP8pyo7Y9dK6YvcRcGoVvzf1WgfwvCiRhjmgEKdAvmqkgVb/gfLX3 ns7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=dAOmBin7tuGriWYm2g6IMTRCzhM2UaQSa0SQ87LfFQo=; b=XUWGPEZaZE3Su5gOhgMUKAEq/bZXhVdGNuOvnyRDHem2nPyUNlj+P6bT/JqcKyAhnH Twrva3QKXecY75rUhjLogXONnpk1Gv1V0SHgfm+WrG3RHYQORPpdTKv9HPy90jcjyVC7 RQaNy7ZH52PFfsvHaidHPSwlHlxwp2QMIC8fpJFSRhH0AeqinMZ+R9tC/IFSTkpp7ujO rq8OxrbbO4Jns25KynPlnsWekDQ++QqOUrS/pwcv2qAPxyLhpoOF3c5qvbwWwvoJwsEY GE3Rk43I4SBxl2gaeCqTgKfE0f3C3Q9E2wzLbD99UikPTxxGKvwvU1HERUAY5+PRn05S asdw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7-v6si10832811plt.374.2018.03.06.03.49.20; Tue, 06 Mar 2018 03:49:34 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753525AbeCFLsD (ORCPT + 99 others); Tue, 6 Mar 2018 06:48:03 -0500 Received: from mga09.intel.com ([134.134.136.24]:12543 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeCFLsB (ORCPT ); Tue, 6 Mar 2018 06:48:01 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 03:48:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,431,1515484800"; d="scan'208";a="22923714" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by orsmga008.jf.intel.com with ESMTP; 06 Mar 2018 03:47:58 -0800 Date: Tue, 6 Mar 2018 17:21:54 +0530 From: Vinod Koul To: Qi Hou Cc: dan.j.williams@intel.com, fmh6jj@gmail.com, fmhess@users.sourceforge.net, jassisinghbrar@gmail.com, rmk+kernel@arm.linux.org.uk, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: pl330: fix a race condition in case of threaded irqs Message-ID: <20180306115153.GS15443@localhost> References: <1520298817-19870-1-git-send-email-qi.hou@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520298817-19870-1-git-send-email-qi.hou@windriver.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 06, 2018 at 09:13:37AM +0800, Qi Hou wrote: > When booting up with "threadirqs" in command line, all irq handlers of the DMA > controller pl330 will be threaded forcedly. These threads will race for the same > list, pl330->req_done. > > Before the callback, the spinlock was released. And after it, the spinlock was > taken. This opened an race window where another threaded irq handler could steal > the spinlock and be permitted to delete entries of the list, pl330->req_done. > > If the later deleted an entry that was still referred to by the former, there would > be a kernel panic when the former was scheduled and tried to get the next sibling > of the deleted entry. Applied, thanks -- ~Vinod