Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1270981ybl; Fri, 23 Aug 2019 16:37:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKkwo3LnR7sZTW1je8YEq8oy5K7WQ+UPFyfw+M2nX4vSH8Z5xwC1RfaDPizpbNifMr+/ne X-Received: by 2002:a17:902:1c7:: with SMTP id b65mr7394147plb.313.1566603472686; Fri, 23 Aug 2019 16:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566603472; cv=none; d=google.com; s=arc-20160816; b=GshJdGGto8tenuq2DzdHHRjMAUWYNGoI4jWQiWx8NClo3l74IXmYCxavGLwE4UYtSh cAEQOW6aoTTbaHMBXyTt2RAVHXbSQPZ5Sw8HPb8dxFaRXygd2pAqMFuDe3KOdz/Aa9n8 8+LCqHk1RtXwDH/H2DyezMxwU6AXN37TZD+JtIS3SPHCwkifL3F47o536T8Oh/dYjWGB 1ExUCRdCwdRq+rd74PwNe3frwm+NR9+cvrET3Pjo3TYPxloRzn8Wk7O0KV2fDNJxjwZ0 Cz9tLcUSQA7rathCbFCX4nwpk0YoifI4zCWby/4USAqSpP6E7BtNkTxhKbG8xWO89cs5 tEjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=FYTRVOUyodl3Y4MOOfrDquojBPwPvHQa3bd0t+obIek=; b=ElbseYTyTEifuO1N09wwrp9o+2nrnFSmHwD0MVoByYloqOTz+P9Mx9zGydZadxvD4m Uq9LQxyCBnvESUNvFtBDuP8r36e5TNmXEyRBEMsCS28BKFkowt9jhh8pz9e3eQ/V5BRA PzxWhVVcUcYVgrvbNL5jGMQg/b0a5kkLq2MT8pAwUwSL7TH87PJlHEv7j66KBpgvE/D2 6ORwThRTTIQ1kfLhb1Gva3ZHaUqR4JXBvnnJ13aB3LB5bw+IKEaVHtHMzKHvVikqM8Ez hg7hKyPlybXGNj/C6sFi1OJ6+85G99Ztp32F9g+woSRg8wBGXKc4YVoiLMlnBuYL6qsZ mipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=CbEHObgK; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si3476630pjq.52.2019.08.23.16.37.37; Fri, 23 Aug 2019 16:37:52 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=CbEHObgK; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392412AbfHWT4w (ORCPT + 99 others); Fri, 23 Aug 2019 15:56:52 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40796 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731765AbfHWT4v (ORCPT ); Fri, 23 Aug 2019 15:56:51 -0400 Received: by mail-pf1-f196.google.com with SMTP id w16so7127356pfn.7 for ; Fri, 23 Aug 2019 12:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=FYTRVOUyodl3Y4MOOfrDquojBPwPvHQa3bd0t+obIek=; b=CbEHObgKjJpbHN1oZh4pOMIH5mUHa33/hNLK99CTRxdBPdONQ5KKkUkFmqlasemH6L merAVOVyx5DcQxPPbVJLQJtiW9RTbxz4nazl+knP4n9o34EmvQx+v9w3d8CEbby18rw4 PZtRY4Uw0e+jQ6wSGHrmGIvnzAKOOBlxvrqPM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FYTRVOUyodl3Y4MOOfrDquojBPwPvHQa3bd0t+obIek=; b=Wf8HgEmFCTV+bimni1JU+F6LnVpGLKhi2w3D5b/O5evxbUBJp2Hfviu8g8HaGqqXgQ XE+QYShjq2xc5nB4PAo/F1qfPrmOCcU6AfJ+srNNtWqtCKXuNNnIvs1adZhF03EdaVwS FzGdDpDTaHETxCp58LUxbdA2PWqy7lbpKtcL0M/7gooayPniR/sRtySMTEmmu/HGdE9Z uEhoAgigl6PtprPp1xAnP9lKzzYuoa2kSuR4HCWjP88j6csLKINKsEWuZMqey4/coHIB Sv8/xZY+Bdfr4XdcZzyxmNI91QF4U/+7ThaEvcROrG2nDw7j3zimX9qFMut83btUoFwU 754A== X-Gm-Message-State: APjAAAXC76CvX7S2Lb438AiCovYm1k+ys86qlcU2/Lb0XOxgJPNvcxy+ Kkp82oFw8YNB7SrXhGkPQUFFtg== X-Received: by 2002:a17:90a:ad94:: with SMTP id s20mr7155476pjq.42.1566590209928; Fri, 23 Aug 2019 12:56:49 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id z19sm2593052pgv.35.2019.08.23.12.56.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 12:56:49 -0700 (PDT) Subject: Re: [PATCH 3/3] firmware: add mutex fw_lock_fallback for race condition To: Luis Chamberlain , Takashi Iwai Cc: Greg Kroah-Hartman , Andy Gross , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , linux-kselftest@vger.kernel.org References: <20190816000945.29810-1-scott.branden@broadcom.com> <20190816000945.29810-4-scott.branden@broadcom.com> <20190819053937.GR16384@42.do-not-panic.com> <16823ee6-c52a-b3b5-caed-79c00772fa68@broadcom.com> <20190820012655.GU16384@42.do-not-panic.com> <20190823154301.GT16384@42.do-not-panic.com> From: Scott Branden Message-ID: <95736fe7-31e1-ab6e-11f6-e209951402a9@broadcom.com> Date: Fri, 23 Aug 2019 12:56:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190823154301.GT16384@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-23 8:43 a.m., Luis Chamberlain wrote: > On Fri, Aug 23, 2019 at 12:31:40PM +0200, Takashi Iwai wrote: >> So, if any, we'd need put a mutex around the fallback loader code. >> And, the mutex should be rather per device, not a global one. >> >> Or we may trick it by appending the second parallel caller into the >> same wait queue, but the code will be more complex, so I don't think >> worth for it. > For now I'm thinking of a new API with a devname prefix to the driver. > I'll have to test if that works, but not sure if I'll get to it today > before my vacation starts (today). Have a good vacation. > > Luis