Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2440104lqo; Mon, 13 May 2024 20:37:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKuoKOldtQLqdqqO0GTsr09BBaCUpIbBbenZFpOzqYmArWNBf18xiOvlGBfGniISWnryvTH5zv5Jdlbt6GasY8ZaDrdrx4TosFrI9Ldg== X-Google-Smtp-Source: AGHT+IFAkdOAcUwRqzDaqgxdpc+lmmkoXnPV666s1D0omr+H8wUge9tSERsQI3csqJ3yjz+ot8Yg X-Received: by 2002:a50:d482:0:b0:56e:2b80:d87e with SMTP id 4fb4d7f45d1cf-5734d597b89mr11490179a12.2.1715657844640; Mon, 13 May 2024 20:37:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715657844; cv=pass; d=google.com; s=arc-20160816; b=WEgGnbogOuRwqQxnHiXoYO2fFiZw9Kqrerd9SJCYH7I/CNN0jYcfcPEPVkXTh2KUXI m21w5DljsOScIcMb0h8yK474VXIGyI9Z/lxei3wQgMSfen/CALDvra1TCetiOSqJq8/f Zzc1raanBI8OOydBvjohR1KhD0J5kYEZB7IWGJNAZDXJtWVG1TbWGlx9Fsk8lgr+UOeQ D/oODPydd2yphfYpAhPxond78SMoPEk4PRkq7iyn18Dx+QJbvzSgjP4fv3zKpU1uN5Mz v8c6igNnTktW3TY6QWvnbvi6SPa2XQu8ccB1oBa2a9ODVgd/4gKZOzPz5fwtVVPipgmP J5Iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=D4diyAXoylKwq6hu+E7WuTzqNCNKPoRg+9c0MpBL6jk=; fh=NTGr48AnN2m2NhJ6/BzKwrRNst2sZtV/5N44VSb9A4o=; b=oEwO8QaA6boc4ZEYpD6+Rcw7lRBMS6DF+Hu4ltgGAr+AyHCfobCAuDBwyi9OEUYnp1 7yeF9h9WL0yCTie7tUmO65pU4qbhcG0trevHMvY001JsdfFTDAXiC00g/wdCZHu59dFi PyVYKU2j83jlfgHngAibGleTsbt1vuCgI8S4oW4m8VgSgIACcNjrXVpXXh0u6el6UJie Tt1P+3dWZ+GHdJt2FrF8PZIJz3UhEuOZnXXWfS5NkFaK2C3BovqjMtlxnSuDgPebAO7m DvKXYaX+Wo4sVE93QI2p6gHIQPunhtT6e7G38J89FMir2FrbHUUlEjjXDAZq0ARS5G1O ++TA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lGJcYTOj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574c0bdd728si2451373a12.291.2024.05.13.20.37.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 20:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lGJcYTOj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DF0801F22996 for ; Tue, 14 May 2024 03:37:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB4D9E54C; Tue, 14 May 2024 03:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lGJcYTOj" Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (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 8DE62AD53; Tue, 14 May 2024 03:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715657823; cv=none; b=bMVygC4S3AtsUjqeH52lB7ZLJazIgeUMN2cfKl3kuUTHaPW43tUb/d6BgUfxXb8DHJx5jtJlU3uDg17oARGV8kMR/ebHIZ6y0JioytVw1TucYvpXZooBAIReVDhzdikUsCNZuv4pL3+E/5MLD/uKVghmlu4USnDkVw+9XrHcQDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715657823; c=relaxed/simple; bh=wNxgEplY1U+bfVyV+K/LzSYBF/hHNlSg+9Si5gIrj/E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SlP4kOsinycV0HkBTgwhz+g12jaxmQAjz/hmSLOrtOkDZWZN9wzb7mAcB1T2BBBxU0FEHX039Gb1zmUrHN5rGR0wnhjk6gicAOwA72nn/h9AWX/Eu/ZKB5Q9oQJBMHFKkEMz7ZGugueGSyj7yJJbuhpkEWTKUH+O01ML8kt7ePA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lGJcYTOj; arc=none smtp.client-ip=209.85.167.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3c99aec9598so2027575b6e.0; Mon, 13 May 2024 20:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715657821; x=1716262621; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=D4diyAXoylKwq6hu+E7WuTzqNCNKPoRg+9c0MpBL6jk=; b=lGJcYTOjH19Q7TKRIwxXgEcGQkH3Sl5/NPj5Uvz/NKPDT5o36mAr1py/VvG4bE26Li DKR8IfJB1UULKhpxD7GA/fxJPucVM8tNaDA+EePojEY3LPvT0wdVP5Y0WrJf7s+vYTCM YdBNpD7kBwyi3Vd8XmMBm8BcMrZHnRkmNrk58wcCMQu/r2VkeuUiAGKPycAtfAmetfal IPtfJHJLYusqydQ68Eh5Izbrv6BP0IlOh6vfzCWyEblkc6hQ9b5twfDn2l46st8+vCgP 37Vx8ykDVJdDsDmR7EX3dZ46JKMrX51KZ6AmqE0aO/GouA4cEZhG3/aFILbAj2X1HuzP 4Inw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715657821; x=1716262621; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=D4diyAXoylKwq6hu+E7WuTzqNCNKPoRg+9c0MpBL6jk=; b=WbncQDMPRzDwSDNQvZvW8kO9jUDJz1c5IaBL/4+RKv0YW4ar0m2XzKZfAR9kgoDoqb 61DM4uQca+DETKFxJaTZdBrkjWKq/he0oR7IwNVGyy99TS1nO/ltaCTXkiCroCdEe4a2 Z3rQObzKBrdky2PIPY7VAQpf8w9yPbE0/8CSuOieXhnB93nOpQLY2TftfaAVGAyLcC8d ipadKMASDBjBxkI08Fd8pqJAvF+ZAfOEGNPREj/ZzFun0q/U0d4PSGVuEFbTBIL1Bzes nD9hx22uUIhGAotfq2KpPUsqgQwLuCrHQLm8vggv7AZBQv4dMSxY5shSNp0WzepiLDb3 63MQ== X-Forwarded-Encrypted: i=1; AJvYcCW+cd69aRSulraqVhX7IWI8k+Bdyva/tTd8qcupGQHzFO6nHHsILW54+8vlLBT7fb3X16n4Q/jgrEeEYNnTLyMEXzXJO8BW6YraDA== X-Gm-Message-State: AOJu0YzBynkKA+T12VTblbWXmwy8WBmfMcajkCMF2/PIrh7Iq6tHdBh7 DkO2/9osUwal2Sflqv4zDoukN7lG9rMjMPauocDal/LuCO3xUvr1 X-Received: by 2002:aca:2b18:0:b0:3c6:f339:7f4c with SMTP id 5614622812f47-3c9971db182mr11999860b6e.49.1715657821410; Mon, 13 May 2024 20:37:01 -0700 (PDT) Received: from rigel (60-241-107-82.static.tpgi.com.au. [60.241.107.82]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a85f3fsm8092909b3a.82.2024.05.13.20.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 20:37:00 -0700 (PDT) Date: Tue, 14 May 2024 11:36:56 +0800 From: Kent Gibson To: Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, Bartosz Golaszewski Subject: Re: [PATCH] gpiolib: cdev: fix uninitialised kfifo Message-ID: <20240514033656.GA24922@rigel> References: <20240510065342.36191-1-warthog618@gmail.com> <171534996897.34114.8159265536879918834.b4-ty@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <171534996897.34114.8159265536879918834.b4-ty@linaro.org> 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.