Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2501543lqo; Mon, 13 May 2024 23:56:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUX9hEyQQI4a0RaQ8JQlN59A41AHvbnv6C3OKJuChckaK/JeJAzvhUVxWYlp9hhYwdpjmcmLXYHvp6cjZErwxjPus/zHxtU30yhshciuw== X-Google-Smtp-Source: AGHT+IG80clsH5g33MYKXjMsk1h3442s/T0y4p8xWbmar3hRFU8EsO9vSX8uLVDZVkdYW81cME8O X-Received: by 2002:a05:6214:2f8b:b0:69b:12a0:295c with SMTP id 6a1803df08f44-6a168378b13mr148556696d6.57.1715669793796; Mon, 13 May 2024 23:56:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715669793; cv=pass; d=google.com; s=arc-20160816; b=jYS2h1dNmYNb+NCz5svy/fhIVOd54VT53FuFFYeL90ACPXImvT1MKR6579xvDh/ca1 HfY0EgjipTfvm4wsJLJbtPacgJKO4T0Z2znsJ8i+g6GVRoLwwMRzdsysLkj3PDDppu5x SpS/mzb7qBRqTZmC7uwlwmHAHKgl+i+Y+ArTqqET3HRmThfd9XrFRrhexZ/QrUH7zlXY 3uZw1S+AYahUhZb4PTjsxLJqBjYeh+b5Z+1Q14dnRq+X14JVIKKhWcIAx2mckeEsPZ0h 2bLbSYO0c+QevnMfLUMXz2hqiBSJeyRykj/F2EUY1YBrG1ZaKXZY28/VuFjVDOIXM8Nw vzpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=v437HTtmd0Eobt8bZsNnd8lfEPszKL1Tp4e8h6Bn+yg=; fh=xFdS5VL3I2wiE4dV7bO165WIhyu3Jn8jxJwVPN8k9Hg=; b=tMGcOoIaHF90fLvfFVJmbWK/EI5rOLcxIsMRYaUyvbTHT2WwCl0wGV0UvPxfe5+CDQ j9kTRyfCR5EXspce9QVYcIlx39r5Yr6H7+rX6ZxK9WtZQRLuBYQCp8Ih5X2Xi+R3aPgP /ivI0SP8LyQeUi4DjvyvLP8X7pZ2jYEMXTO/8QYUYqhQHENqlMQ3g4Rwv4kIVtAhz/V/ g9IPlrcjxapSDE633C8zQqBhOp+QbzIua2VKd4iY/7HaD6l0S2Z/YRCYZK1lCrLsLFbq End4H31K0ro6hO/jAhaWSV5FSq2re0bAxMybfpTl/ARDilaMYa9Ih8MNRd7PD/Ru6H6+ oVtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBM9TtdZ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-178357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2ee1f3si111983206d6.502.2024.05.13.23.56.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 23:56:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBM9TtdZ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-178357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 870241C20DC9 for ; Tue, 14 May 2024 06:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 690BF101D4; Tue, 14 May 2024 06:56:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fBM9TtdZ" Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FB2EE541 for ; Tue, 14 May 2024 06:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715669786; cv=none; b=Dle+GeFxamhEnY7UCwiwGEvNntsGSfwRH5RCey+hX3Q/gEacV+WpBQp+w4aNFuQOvJ2h8FyW7lvuVH5fULjVJSFVJ3caGc/lYC5KRaD5GOa07eFAwz5h9JvXHQ1D4hs7VY5pB79uFSe6R0iNJ21DFy+2aEQQ7nhJ7aWH+lRKNY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715669786; c=relaxed/simple; bh=kDb0TWDdZL71YLB5umWKkZwh3jpUzm39KDlFCcL+eRM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Xf14cL/XlYsoPgy4kaMBos2Gf3bRMS98NtsuMpagIdwDLJqwsJwCrZvpQJ9YefaJf9UQrW9IfqRteqINMlSgwyRLVZqlOgaLrByWWwc4Qy+YOQf4kRKn6KEnVdYBv8sI9Yc3Ph9Yv3EzK4uKUfsfBwcqzgUATLtTkbgGVDJTpcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fBM9TtdZ; arc=none smtp.client-ip=209.85.219.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso5034899276.2 for ; Mon, 13 May 2024 23:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715669784; x=1716274584; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v437HTtmd0Eobt8bZsNnd8lfEPszKL1Tp4e8h6Bn+yg=; b=fBM9TtdZ1GosciEn4lwomuT2cxdC9zMUaJpJc/TA3Vx2RSpnADq2Xvn6c3gKpjGXML J8BYUHvGvKtVWl0joNEJ6f4EDAp02fZZxQMZW3NWTlJH/bVAupAniosolKAhfDwzBB7k HPi7jCZu2ccgwDPkzsNuHXbfP57X8Gt5pKIPLeNpzLw2cclzBSBy0eOOCxh3pLKumNRD VNjQRTcDGfk4MgrQEDuJTVTKFdRwN6SimTRyNBCfMhZOGYrdmGMfC71hmxYONOjZ4ix5 WR5q70kQy0w2/HTMhDPfXK93KvoEzezCJFTrvgmotYQ3kREUcTqVavXMgyA87E8p/5YY 4y5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715669784; x=1716274584; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v437HTtmd0Eobt8bZsNnd8lfEPszKL1Tp4e8h6Bn+yg=; b=Zg90QVvjd24Z4IMIhDMRXSVaiT6wpEUptZWbDSGUncqGWxgbateRzSX83IQDOkauXX efRX05iQ/B+AgNX1PACI5vlUZxST5Azr7GgL0UvzhFUe1PsTcGYR/hZMUNZJnOZLvrxX IQd1piFc6TyS2qkrEU2fPwCr4NwGueFzY7P/CRKb10GVZt35FkJllg/wOcThSxTRXomY bQ5BjZANl7ErEu8uGehcQIwJRGKSPpForm/6rSbfIA329bBLokN9Kqo5AQkEk6LgMSBb BgZF4dcaOlhQskrGCRCrWHUSuERPpVrmq85wL9jdFUIp/gaqJqWEOoMQDg1O+WjkDhsp YPnw== X-Forwarded-Encrypted: i=1; AJvYcCVwp8UIYw+u4AWPBi8mf6lA0PS9oBEdidtjhP2kQWalPQNc9rRsqcYkydSbXmPRgAfuGP9t0ifLe2NtQyuIDwo5dCUC4g4FdiOZAS66 X-Gm-Message-State: AOJu0YzaMUkzIxWj4PkDwlPeAXiqs9bmCWH2aHi9UXbTXSlhCDiHkDh3 mWyJyiUeXFKXgRRu9gFcZRNLZOoqWjFK/p6Pz0GugQ85vCMxLrFuWC8QAvUnJenWrdD2TjdKJmG dBSbwJyKNGkFq1oyUODEq3yCPVeaMcnmjztQm+S33qWbJM6IIOuU= X-Received: by 2002:a5b:40d:0:b0:de5:9e29:b5bd with SMTP id 3f1490d57ef6-dee4f33396bmr9939038276.64.1715669784141; Mon, 13 May 2024 23:56:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240510065342.36191-1-warthog618@gmail.com> <171534996897.34114.8159265536879918834.b4-ty@linaro.org> <20240514033656.GA24922@rigel> In-Reply-To: <20240514033656.GA24922@rigel> From: Bartosz Golaszewski Date: Tue, 14 May 2024 08:56:13 +0200 Message-ID: Subject: Re: [PATCH] gpiolib: cdev: fix uninitialised kfifo To: Kent Gibson Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org Content-Type: text/plain; charset="UTF-8" On Tue, 14 May 2024 at 05:37, Kent Gibson wrote: > > On Fri, May 10, 2024 at 04:06:16PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > > > On Fri, 10 May 2024 14:53:42 +0800, Kent Gibson wrote: > > > If a line is requested with debounce, and that results in debouncing > > > in software, and the line is subsequently reconfigured to enable edge > > > detection then the allocation of the kfifo to contain edge events is > > > overlooked. This results in events being written to and read from an > > > unitialised kfifo. Read events are returned to userspace. > > > > > > Initialise the kfifo in the case where the software debounce is > > > already active. > > > > > > [...] > > > > Applied, thanks! > > > > [1/1] gpiolib: cdev: fix uninitialised kfifo > > commit: 3c1625fe5a2e0d68cd7b68156f02c1b5de09a161 > > > > I've got a patch series to tidy this up and catch any similar errors > earlier going forward. > It is of course based on this patch, but that isn't in gpio/for-next yet. > How should I proceed? > > Cheers, > Kent. Pull in current master into gpio/for-next, apply your series, make sure it works and then wait until v6.10-rc1 is tagged because I won't be picking up anything during merge window. Bart