Received: by 10.192.165.148 with SMTP id m20csp1755482imm; Thu, 26 Apr 2018 01:37:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoFBRlDQN+22sJckoSuby06kRVK2N68RMg4IaCuCuPfRr3UZUHhXniV5VGX0XgvFV52F3Jk X-Received: by 10.98.67.83 with SMTP id q80mr170668pfa.228.1524731839423; Thu, 26 Apr 2018 01:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524731839; cv=none; d=google.com; s=arc-20160816; b=au1w9mRswjn36FE55lacfCQOjx3Az7KCi4eZBBUPyMtGKTMJxN1Gwe0XABqQrLZODa webf6q5uvZnCNOCYey8rcigkhcdFWgIeDfrEe4dK1P+o3ekbzxAaEV+a73q82fr6s8Pm Zs9GPKq7/IXyW7JyIDHFw1ucDYQ/d8ZEbS9Kb8qN40kAH2AR9YGr99MLI2fQogIGdAak +kOQmZKBkVtMTA8tGM8q78BKkmrX+aFV6QLmevBiFnokwqHSVGtHnA2ecqkAF9vUs4VX +Pa9/pxd+y8sDl+YX3MdToTItCWH72f4KZ2EamdjQPgKmt93unVujTuhrW8L51O2ji5O S7YA== 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:dmarc-filter:arc-authentication-results; bh=nCnTXYnr8fNBnPL7Vk8DXnfnESx9vfuP31uQR14wGLU=; b=CRrgl5m4sYcrQ0t4vYLTUUfCJfXYSFNs/KgORzAw6HQxfi8G3M7FBsCfh7Ut5Dy7oH tUreWbOwwCtuoecXDF3uBGtuwOBeW9BgI0AlXyBskjoPjY1FnO+dWYmeD2+xZXT4tqzQ IJQAiN9EJWrQ9sb6uLTLwPHFG0Jcoz1FwkYyQutffzR7thI3n4mVdoujNDxrtpl+Y83T WVR8AtEU8FrXwS+z6Iq69elTL7x7Iz0cXCa27whqK13+jigXyJy1JLJzgt99bUFp7zfz u+j3AB6W71rW3ktRNFf5RL+/qOeyL1x2ZJQa7pgrPe8uUzBGRImUcl40JiHtDjKFuIR5 Vgcg== 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 t9si2440317pfk.228.2018.04.26.01.37.05; Thu, 26 Apr 2018 01:37:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbeDZIgC (ORCPT + 99 others); Thu, 26 Apr 2018 04:36:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:40642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753000AbeDZIf4 (ORCPT ); Thu, 26 Apr 2018 04:35:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B98DB214D5; Thu, 26 Apr 2018 08:35:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B98DB214D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org Date: Thu, 26 Apr 2018 10:35:42 +0200 From: Greg Kroah-Hartman To: Geert Uytterhoeven Cc: Geert Uytterhoeven , Russell King , Adrian Salido , Nicolai Stange , Sasha Levin , Todd Kjos , Linux Kernel Mailing List Subject: Re: [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override Message-ID: <20180426083542.GA31073@kroah.com> References: <1523366506-19832-1-git-send-email-geert+renesas@glider.be> <1523366506-19832-3-git-send-email-geert+renesas@glider.be> <20180425160645.GA16732@kroah.com> <20180426070410.GM14025@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 26, 2018 at 09:40:08AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Thu, Apr 26, 2018 at 9:04 AM, Greg Kroah-Hartman > wrote: > > On Wed, Apr 25, 2018 at 07:53:06PM +0200, Geert Uytterhoeven wrote: > >> On Wed, Apr 25, 2018 at 6:06 PM, Greg Kroah-Hartman > >> wrote: > >> > On Tue, Apr 10, 2018 at 03:21:44PM +0200, Geert Uytterhoeven wrote: > >> >> The driver_override implementation is susceptible to a race condition > >> >> when different threads are reading vs storing a different driver > >> >> override. Add locking to avoid this race condition. > >> >> > >> >> Cfr. commits 6265539776a0810b ("driver core: platform: fix race > >> >> condition with driver_override") and 9561475db680f714 ("PCI: Fix race > >> >> condition with driver_override"). > >> >> > >> >> Fixes: 3cf385713460eb2b ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'") > >> >> Signed-off-by: Geert Uytterhoeven > >> >> Reviewed-by: Todd Kjos > >> >> Cc: stable > >> > >> > As this should go to stable kernels, I've fixed it up to apply without > >> > patch 1 as that's not a real "fix" that anyone needs... > >> > > >> > Please try to remember to put fixes first, and then "trivial" things > >> > later on in a series. > >> > >> I did it on purpose, as the fix is much more ugly without patch 1 applied. > >> Can't you just take patch 1, too? More consistency is always nice, even for > >> stable ;-) > > > > Consistency is nice, but when you have bug fixes that rely on "trivial" > > patches, it's usually not nice :( > > > > I already committed patch 2 to my tree without 1, so let's leave it > > as-is for now. > > Unfortunately the version you committed is buggy: the race condition > also covers the NULL check removed by the trivial patch you skipped, > so now you can get inconsistent behavior (no output or "(null)") on the > same running kernel version... > > Please revert and apply both. Thanks! Ugh, you are right, sorry about that. I've reverted the offending patch, and added them in the correct order now, I should have listened to you :) greg k-h