Received: by 10.192.165.148 with SMTP id m20csp5528787imm; Wed, 9 May 2018 06:33:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZonDB2uVydye1rQjW8xrKumMoIyWHymCOjuGO42h8guK8mISESk8xqP71Fwjw2qE8zV7Ltz X-Received: by 2002:a17:902:7d09:: with SMTP id z9-v6mr46227902pll.4.1525872812039; Wed, 09 May 2018 06:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525872811; cv=none; d=google.com; s=arc-20160816; b=h9wlwGUlenD4ucnU3EgL8r530ewK/wZ/+6C7vUO1VkRv7deVpr3O7DXCTLzMQfxOdj yershOu7dED7pYqgbpPzQYj1IuOwBrkFZR8O0BEjiCtuRx1VmYDb+KeP1Nc5cPgeSA1A HoSd6jUiQ1vl9wkyHwgzcV1VoA3Fmj2rLp7ncNLyY9h4XhBK+J7y1BCfXGSS17Yha1T9 0WOs0pUjoU0xXIQWU0kcQyqDSTMKecVPvhNiqgh29B+CJA5N31heoKf+aGt0KIHk1JAA VESB7sbfcHiPeDWG5VIFKpVVnSoSRfhQINKlFNqqrcLSaU5oUkw/yP8vsfzaijB4wKTO IcPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=7VdZER34IXtGuqui7oay0lGbU1lQEzTIOQn+Pibe78w=; b=yZzcYcd76vyfd3EbTMxnMaes5Iu7dG/1F7GcenhqXAN5iWg3M9VHxcDpFyHXYZnofS H+CXs4fGCvLhFzODJRzwZHdy+JRYmRopKcSxv8WbWoA/29LU0PHYeVvvMiQnXii6k0lO roQkfSxKH7ccJMHnfAjPeKnw1sGFZ/dpQVAjqWPaFoFIRI+5RMjGV74ePjKhvJBfQlLG H5yB0jSB6pXLsQCZ0XPOoHIDuGJU0Fo3SnL/X89ygIB4anMmxnCkiqSKHZdMDJDt4t1Z ovv7GGtORI5dvNO1jtx9AJ8diYyNuYgBwJvOEbI2b2DIW6nLFld1zvCXXcdYQeOQXwDH C2Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VlEhAwIy; 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 c10-v6si17002534pgv.446.2018.05.09.06.33.17; Wed, 09 May 2018 06:33:31 -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=fail header.i=@gmail.com header.s=20161025 header.b=VlEhAwIy; 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 S934914AbeEINcT (ORCPT + 99 others); Wed, 9 May 2018 09:32:19 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:39878 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934775AbeEINcR (ORCPT ); Wed, 9 May 2018 09:32:17 -0400 Received: by mail-ua0-f196.google.com with SMTP id v17so13679772uak.6 for ; Wed, 09 May 2018 06:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=7VdZER34IXtGuqui7oay0lGbU1lQEzTIOQn+Pibe78w=; b=VlEhAwIyGCPrPoNBOWcrw+FqLFhYEr04H8bEtuWAw6MaGSUuGptdSDlKZXjn6dklyC Np8b5tM9D5dkzoS449sao/sHDGciH2Y3hzncUM7ep4RgZvoUCkVe2+ZzQRSlRyPW41Pz GHI7y8gsybXmNiO5gu1t2IpGl+XgpWq8bfpQw7YXUTJx2G8gZi8jGpaUqk1oSoKpUP8a pWlXqsD3+Fh31e/0XWGquBsT7UWrfGrKOBRLXzMjnhb08NvUEE7mzrXQX7spFydja9et IEjh5dBWmqflt7qNjYUfe3G05xAvQuy6c6ZrxWjg6cG5fVpq1hSKN2kTBs3/ccrM5EGy Z4hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=7VdZER34IXtGuqui7oay0lGbU1lQEzTIOQn+Pibe78w=; b=lcSjst9KQArqZ+3XEWWHiekDXDmioXGwnHpy2xeXrLV1qnmX715eM7BnBGK8g22Nla qDPXfNhntiMVW7xBAB/B3itvDxMr7qQ2y4Ae2neCc8pDPwY4d7QRSylVo7dhmnT//mcZ 4qgllRg44VOW4qe7vcwHTmHIOx+z0Ln/BpaF6lez9J0dgLl0IouP35mm2K6/bg9M4xlI P5OmeAbV2yKl624wp0nsFuwjHsTcn0A1mjh7FifwzwZuzuVQxRx37T2ZuICQw/1D9CXx /+opMWrMZO7XfeXhFjI/GW6r5lFqwyQ0iFtf1cXSfcnR1e+Om00IP/9AA41zelDYysoe KwZg== X-Gm-Message-State: ALQs6tDyDMyZPwHpxP7TvLDbkePMalUov4VliOMt1sPR5WpHlCPD6fBa m87L8i5dnMLG35v7XboRlf/Kq1L/VP4TT0waShs= X-Received: by 10.176.81.6 with SMTP id e6mr40376878uaa.33.1525872736639; Wed, 09 May 2018 06:32:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.10 with HTTP; Wed, 9 May 2018 06:32:16 -0700 (PDT) In-Reply-To: <20180509103954.GR16141@n2100.armlinux.org.uk> 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> <20180426083542.GA31073@kroah.com> <20180509103954.GR16141@n2100.armlinux.org.uk> From: Geert Uytterhoeven Date: Wed, 9 May 2018 15:32:16 +0200 X-Google-Sender-Auth: pJLVjN7l8-N7t8cAt5bKVjBA_8Y Message-ID: Subject: Re: [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override To: Russell King - ARM Linux Cc: Greg Kroah-Hartman , Geert Uytterhoeven , Adrian Salido , Nicolai Stange , Sasha Levin , Todd Kjos , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Russell, On Wed, May 9, 2018 at 12:39 PM, Russell King - ARM Linux wrote: > On Thu, Apr 26, 2018 at 10:45:49AM +0200, Geert Uytterhoeven wrote: >> On Thu, Apr 26, 2018 at 10:35 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Apr 26, 2018 at 09:40:08AM +0200, Geert Uytterhoeven wrote: >> >> 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 :) >> >> Np, issue detected and fixed. >> Thanks! > > So what about the patches you submitted to the patch system - should > I pick those up or not? I think only the 4th patch (#8759) in the series is still applicable. > Please don't ask other maintainers to take patches that have been > submitted to the patch system without first changing their status, > they're liable to get applied anyway. They got picked up by Greg, on request of a third party who wanted them in -stable ASAP. Not much I can do to prevent that. Especially with an "Odd Fixes" maintainership status. I tried to change the status of the patches Greg applied, but it failed: Your request to update the patch failed because: An internal state error was detected. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds