Received: by 10.192.165.148 with SMTP id m20csp1764145imm; Thu, 26 Apr 2018 01:47:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+fpGYjLp7wgRe7LMhYcKbIuCyggdeu+oHdF/rlskxr4Lioqeh/x5ql0vw3WXUUUH75KxPR X-Received: by 10.99.176.8 with SMTP id h8mr26487992pgf.448.1524732460142; Thu, 26 Apr 2018 01:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732460; cv=none; d=google.com; s=arc-20160816; b=Jq0fQmUuyrZgWCZKJ2c685I4bY1StsRFk+hA6LjTx7Ysk+HGGxcm/IyW/JtcKPGDNm 9Tnj0QdsziI5ejvw48WSYQ9Oz1nilx8YWp/pKn/5hqlFc9p6Fbjz6+qu3s6Usi9EN8G/ H41k7V4+Q0NG5K9jGz/LxNL3ECCJW9T9HBy5VAoinsThgPVP6f4giycKq9CADul5huNO Kc258fq8dJ1LK2az6JfuwfIlcs/jvWY5KsUd6DUyO+qR2NkHBv9jZU6BiQvHZgfXAL5V UIWE3MUnZ3sejb5RYpfueVo4+C2WZH3Tx7hUupXbtETrtcW7nEnltYWEhfxvYxGNhKqL FC9g== 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=5PFvN7umsxkCEy2XpAHtlgcNWA/CibLzrLgXqA7lfdY=; b=k6TPTqPNw4ykplnP1YryHhlqFv8WZc/Tg8Bd/qRVyckyPtawtjJIZWUqfmoH46JwVQ m10EoImKa5B+qesUJJ+xa63TtBF/DodUWz8Y95IzmH4M2JD5Ng/zBW1qf8N3OAdyYdcW +Nzy/bdz9P3oFVmVLXzP8xVrTc/M6vv6y/wa2obKYKOixx9sAhFE4nJHaFMZ0EM0dR2I ldSprwnXm38YZTvT2jqeh9iOka7mNHPlSN4m58ap6OK45QQYdOKPRhtIogkWSGgSozP+ ZaTCUM6qQPb5BFseiJFFj3kbG+RyNbS77M3Td5fpo4q9KCg3SKw4SEe86ftzkhoPgP6T LHnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ks8GTmJm; 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 j1si10344881pgs.24.2018.04.26.01.47.25; Thu, 26 Apr 2018 01:47:40 -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=Ks8GTmJm; 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 S1754766AbeDZIpy (ORCPT + 99 others); Thu, 26 Apr 2018 04:45:54 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:33134 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753403AbeDZIpu (ORCPT ); Thu, 26 Apr 2018 04:45:50 -0400 Received: by mail-ua0-f195.google.com with SMTP id i2so2978900uah.0 for ; Thu, 26 Apr 2018 01:45:50 -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=5PFvN7umsxkCEy2XpAHtlgcNWA/CibLzrLgXqA7lfdY=; b=Ks8GTmJmjER+3MLIhDHk//BX0yQplS5zIizhdTawFqJUqa6ww0VE72iuwNLn6tvIUi Ke2QDeVn+C+5fav2i8bPEW+X3dkPhDJLbmy+nkzg1OXX0zS/wRqzOCEfeF8CkS/cWSaV hOoa94nElWMIP2azMmUjGOHO/kMG7XuwxNdg2qUcbMxtz/w0iFX1QKcR9A3CJdvfhaQh 9IMJygRpqDkivI2FDhvpH/c9L7Gy2/awo75WjeFsr3q7AJ7Uon1lCC0R+2S02ewf0hzq UV/1G/FXopIOODRvVWSPP0LhQoejkRuOUl28b9TmrjZ2U2qCnIpcne6Mhvnln27bEPnO elJg== 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=5PFvN7umsxkCEy2XpAHtlgcNWA/CibLzrLgXqA7lfdY=; b=VnLWUF4WJs7BhIUMSZF6VFHEOHfxvfIDPCZXIJHTyID/PIKQakTxqwI0sZoZ7XtO2X 7yYGVpKk1LIkGc5HnpKv4R9IojxSSN0/ZxjT1jnOnutV/pLsH1+N8wtk3Ax8PNsY6qL7 fJIned1t7pHVDFgDqGlj55vgM2BUpHXo5cx+hcZBBtYB2fd6vNNuVxMFvreUOuDVzQxi 8X1Jrmup7BpSVCPKgIS32Rx9UIsEHhYnCNuoPpUXYF3Oq+6wP8AEmpR/kjMNxrOnssju gKatHenEWqG9HGcnfzkWq3TQhS3Nc/iA2Ey9+Ch/GnwpZxzV+N3gmdZFe70nbRDthMlP KyUA== X-Gm-Message-State: ALQs6tChr4cUydlip3M3iWaq0w0/bd+XExRlsOGSJzNEwZGIIwcK6F6Q iGnyKf8s7w/6linJJN7DhKlxVhYZmHjaNiB5P10= X-Received: by 10.159.55.235 with SMTP id q98mr23533835uaq.4.1524732349656; Thu, 26 Apr 2018 01:45:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.122.68 with HTTP; Thu, 26 Apr 2018 01:45:49 -0700 (PDT) In-Reply-To: <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> <20180426083542.GA31073@kroah.com> From: Geert Uytterhoeven Date: Thu, 26 Apr 2018 10:45:49 +0200 X-Google-Sender-Auth: T8AcLMTHAcm24CuJaAvJl7L8ZHA 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 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! 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