Received: by 10.192.165.148 with SMTP id m20csp1706834imm; Thu, 26 Apr 2018 00:42:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/vlfekexxJOU12YOETsMLMA2PbZDRXlibcNWMF9Et2yXLIOiT8I4nHXkHnpIaFlCgo8e99 X-Received: by 10.98.87.84 with SMTP id l81mr13796247pfb.56.1524728524798; Thu, 26 Apr 2018 00:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524728524; cv=none; d=google.com; s=arc-20160816; b=hNK9YV9382gE3KypVcwb6ygDxxws88iD8n5izJEQeEfLGXXCo9zngPjYN0i6ZdUUGV 4ucLIt4NBn5t8hAt8r0PTQdQ7xWoPA0PHPfwMGjaVLjG9bvyYDKe9cnsq5jXelxdXNmE dFU47PhUfBnzOxPCNbEKiqBsgockYnDuxgYCDBMKweT5YaBhjKSl7krnYAb/kHiY2y/b WKnwubqT9qkYAtlBMfm8Itiq9P4VkY9hDIJqwxAxxwsvTEZ8aWKUOtgdD5hs0MLo/jEb NDhe/0gReGt6DHwq1/xeUBsc+GKDXqFevpImKkXGDtCzhzr92+HSVcehDu3T0QAZsfKG rSPQ== 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=wgv+IQHFPTmGiwQ6Dyax7Ajj3ZX8TS+nKQV7v3OHW24=; b=bQOFhhGa7ylJaTbohTLPR6VCcN1sT8fXfPuElaERP63LefWZEWOxV6tyg3VQbiMGam UGyHbe3+SWqCALfML4D2DXH9QzdAK9NmpywZA9dOHyppafOBd9ZMLGRFXY6y5SE4eIwU Vm64AWJN3PE7uMxlpore5B9feQoaYZH6ehszQ7f9p4BSN9YxdjJ4DBJYyOgXP1HBCJJy wElWsXno8vhyr87uaAuUcU4ZABUTo2gO2i/zyHVxnWqZOievFL93RZURI18jXv4A/a5L yUEIIAbaJudz3+Yr3LLwxgD/YJF/4Wn5PaqfPwRIIpyx1eQ8C6+eVVJ2WTAzmgLywLhS iGvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=o+H8K+6p; 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 f25si11816759pgv.47.2018.04.26.00.41.50; Thu, 26 Apr 2018 00:42:04 -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=o+H8K+6p; 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 S1754128AbeDZHkL (ORCPT + 99 others); Thu, 26 Apr 2018 03:40:11 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:35966 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753068AbeDZHkK (ORCPT ); Thu, 26 Apr 2018 03:40:10 -0400 Received: by mail-ua0-f193.google.com with SMTP id v4so16604925uaj.3 for ; Thu, 26 Apr 2018 00:40:10 -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=wgv+IQHFPTmGiwQ6Dyax7Ajj3ZX8TS+nKQV7v3OHW24=; b=o+H8K+6pFwa96nHJdRf49/IxrZO/nzQyQMoFmEPMjRn3YJ7OmS2hoqOjjLZjx7q1Xo j/TJXAP1mVANsGajN2Oud8g9/cbOgXm4Wqy21BWxz9+E1J7Okea+OHmkz6jengiEYGyh Zk40/59vfYgKxDuVZWjc7BZ5JDl0s/gb+txI8N7C53eLhCNjtpmESxPCWPE+GwpO+JQ5 xitPj4GP39SiIKqP10Xg9oFsl2MlmWJPzMr/obKkiP5RiJa2xlpoPMI1Dy5AYxPcKF1j 2L1d4b+XuSlVkGu9SyzvFCpgY/BLaEyjDxgvzN8RHH0Ox8vroMxkaUBD01k4w69KCRxX GJVQ== 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=wgv+IQHFPTmGiwQ6Dyax7Ajj3ZX8TS+nKQV7v3OHW24=; b=rSrQgW+il592CN/84GWtJG6255dOzDScWZ6g4Q9pL8PnVyUMF+PtliU5Xm9161q+rs 4sSJyFkRP6KWT1RxoQAftc9168ZI4FYjodZp3Dw01pOUWaDnJKwu8LA7k1yXUUll9cOi 4a5sWQmeHNXGghBK6Eupr2IqHq/oVZSxlmwZAgacrayUdjl0CALczdA5pWHFD04il9nM DDmtVo7VWmwR7ewaN6sQKIgbtIMrTA4g6F3rMJnaePvjoJ1IYkMlP/NEaFFFEhq5vVqV 5UkM1kgKozJ6BY1yNARUtHQNUKngQ8CIJIWH8OOpCcvgTgwZYtqIhD+fLqeNJ7g/Qh7Y J54Q== X-Gm-Message-State: ALQs6tATHki6hychtskMQpii7f2stNWpma5pAwc6/9rU+azHbkUte8DU 1Y1CTepZ8Uh0T98k2nlmQxcSrd/mCQCC+5ipcR8fRQ== X-Received: by 10.159.55.235 with SMTP id q98mr23415228uaq.4.1524728409476; Thu, 26 Apr 2018 00:40:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.68 with HTTP; Thu, 26 Apr 2018 00:40:08 -0700 (PDT) In-Reply-To: <20180426070410.GM14025@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> From: Geert Uytterhoeven Date: Thu, 26 Apr 2018 09:40:08 +0200 X-Google-Sender-Auth: 9W2LqgpmNPK6Zxm4z56ZrOwbVRE Message-ID: Subject: Re: [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override To: Greg Kroah-Hartman Cc: Geert Uytterhoeven , Russell King , 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 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! 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