Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp960183pxb; Wed, 3 Mar 2021 22:35:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbmc0CIHOSwEByGw8trz7hFUrFOHCQSEe7x7X3GXMrOsM92ipJIbcpNjowj0fVFZkwcTM9 X-Received: by 2002:a17:906:584e:: with SMTP id h14mr2627579ejs.332.1614839729928; Wed, 03 Mar 2021 22:35:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839729; cv=none; d=google.com; s=arc-20160816; b=tof7G9/bk1iTtmoNn/sLMSaAqF4RS+sQ8yEzn5V5DsDNjB3ZHKjKyeEM5MHkYvwk8K WuKzVEm6EP7F2ayKTlSGu48ptsKWYGkOQokUWLmxmt4e8ymRwdqpsYM56KQKiEM/wptY RR7GhE0Jfps8AIiQxLZknIX4rqbdMWKDUCGUdNXaiYlFuiPBgnxZ+LZ9qrRrokuX+xPk LEXIq8N/Y1/Rjigz2uCpJAFBw3w33hHt5Mfr/hPZUkVccqnsYsQgNhTW9Ijl09HMW+Xo cI5gPrKMqXoU0nz6dVvspwqCUSVqTxKnN7HZ19tun//vEOQavzMjqDUZEIHpyi05IIYZ SLJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ybajfdG4+XkNN0Eukc7RPPGwhIH7By1tE7lla85kmJc=; b=LRijgSQcWahjjfkZ2RMlrwkp+oiJokR/6OIQgiXFN4IgOCDkUjgm/lHwpuGzpoyTQB D+iQ52U3DdRD3Af4s4lN7PvYSsllF9qk3I74MyQaaVi5K3u1rKEnKRHVNlMwNgF6w1VW hJa8o+XPsWUyj4Zj+E9QJG4hyAZfr67kcKqtcQ2/21q+pQRP3ZTFTK8R6vFRfg7BGj1D fs0MSHM5MmuBuU6KqxAR+ZS7iCjTitKkgBIYc17Ts18AEjmUSfLvj6dHzrZz4KLCffNw 9Cni75QLtdF21a+0KLdd2Rt5tARWIuTFncQE0AxankMxmQiGLOtjXKel5zLvH7n6ZG0u A7uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3uMqpuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si16563850ejo.63.2021.03.03.22.35.07; Wed, 03 Mar 2021 22:35:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3uMqpuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1581175AbhCBSk5 (ORCPT + 99 others); Tue, 2 Mar 2021 13:40:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240270AbhCBPpr (ORCPT ); Tue, 2 Mar 2021 10:45:47 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF93AC061356 for ; Tue, 2 Mar 2021 07:41:34 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id r23so24491655ljh.1 for ; Tue, 02 Mar 2021 07:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ybajfdG4+XkNN0Eukc7RPPGwhIH7By1tE7lla85kmJc=; b=x3uMqpuYYn8yTaEpHXoMeoMWgE0stXI0Wn3MLfP4xfjSObNN6BJL810H+i46bQxYTK oPOmAZqvh5L3ZRln/qeZLEMbvggkWh82bdWuKkzV1RKDngtKx+Tv2IxA3KKGdJh2COe0 VXS6tZ6UEKVopM38XktErr33T0ntwCB2igeONXinb30ZgD92lCOu5OqCcFCruqNjymvA 02ah+8RS+d3AKwNWm29lwvx4lncQ0r5T24GRW1kNuxnAnWuKzfiraGt1GRR/kxu8h8EF p2fJFfgAEWzCxdd9EtcU0MVgdAe2t5Y94uOZKyT+zrM8LCTgAr4kFpDmEVhiwtDF8rF7 QJeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ybajfdG4+XkNN0Eukc7RPPGwhIH7By1tE7lla85kmJc=; b=iPOTBd8va6r8eJquALxd2dSzzAi6Ihhzb3R/7NqhzliNMWpEpJzt6y6DG9jQxhegYK ntDCaCU6PF4jonatz/0T/c87fRqbXeo0Me7uDvO45yxOWnqZ8CEsBYY/YOoIBwvlURXF EzRPbG1e4qzRqIX15zFaZihyTGG4j+TqbYpVpb0px8CjIW+cUAbKwRGpT0SK5TltBEsN /CwTnVM2lW0uiJWjbnHiwumYO9X6qvUwg/G/QE1FkxV5ZpDX220UqeOI1AfaZmY1WjA8 Nv+l2xFUQlNZYsFiK+O39uq2WDbncPVG7C36wnjfTIDY3kULbSIjYvBCbh6usubieiku AfUA== X-Gm-Message-State: AOAM532qVbgS/tKnXyGdHHSDQIji+6My4j7InCsVWcq6miVStqFWWXrA UUThaBp+MZS20//dAGlhpMzk1xu8uVXFcalWs0kx6g== X-Received: by 2002:a2e:9754:: with SMTP id f20mr10146762ljj.200.1614699693457; Tue, 02 Mar 2021 07:41:33 -0800 (PST) MIME-Version: 1.0 References: <20210301090519.26192-1-johan@kernel.org> <20210301090519.26192-3-johan@kernel.org> In-Reply-To: <20210301090519.26192-3-johan@kernel.org> From: Linus Walleij Date: Tue, 2 Mar 2021 16:41:21 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] gpio: fix gpio-device list corruption To: Johan Hovold Cc: Bartosz Golaszewski , Greg Kroah-Hartman , Saravana Kannan , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , stable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 1, 2021 at 10:05 AM Johan Hovold wrote: > Make sure to hold the gpio_lock when removing the gpio device from the > gpio_devices list (when dropping the last reference) to avoid corrupting > the list when there are concurrent accesses. > > Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") > Cc: stable@vger.kernel.org # 4.6 > Reviewed-by: Saravana Kannan > Signed-off-by: Johan Hovold Excellent fix as well, Reviewed-by: Linus Walleij Yours, Linus Walleij