Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp685832lqo; Fri, 10 May 2024 11:26:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7lVMhocX6coZDhxtBlK2jyRocVFNM1aGY8b/sV7zJrq5YBq/eyqpwxi7AeQDv5fCMRHFZ64SVjJEmo3pdAj48KlYCYCwiHy0k9xEPug== X-Google-Smtp-Source: AGHT+IGcdbRfHf/qSs0q7qXeZkouV9h0vipZIG1ieDBQ4jHXtqmPAWqKaPPibx8TK0b7BfarwZyq X-Received: by 2002:ac2:4c32:0:b0:516:c9a7:82de with SMTP id 2adb3069b0e04-5220fc84330mr2149357e87.38.1715365614949; Fri, 10 May 2024 11:26:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715365614; cv=pass; d=google.com; s=arc-20160816; b=kpoTkHoVcrka2tH17JleSo8HqtXb10C+K421bFxfD9haUiGiO6fs2RUrQkHKrHMWfa UZCHhsk73E9Jx4HdmGkh5YgrS6r+rBCh4aGJKDKUumlT34zScIpvz/kp5m3LY1IJQjdK u/dRBXIFjyMtm/Fg4isessfVb6xUV5/RhXOQUgFp1dhLZxB76cR+8WAQz2KntDWnF76c 1hNgwc6TSFwoK3HQJotei84Ne579J5nje8ih/ULJDMCG3x5gbkFk2ncZWgMWxpgFglBQ 2bXtTtc1rtLC2PQYJqDduIzgF3nRPAF4hPb45fGZ68GGVCa0Hnx5eb564fvs1+KsqUi2 M+3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3QEkrlUEm+5W5lnp6HukD9LF+vny0h09LkKwSRX06UI=; fh=DKo0cHkZczK1OKYVU0+gc8wrYRRBjA4d66wbBAiob74=; b=m++G+WKGE4DE64hUJYmZEhANtvcOscgbhTYGz+ZtJUQ8pv92jZaAHaI9eNXxauYl35 C03nnC+OhGHvKeDLVPjV44fSJzbgBedyqydRn5BKVYXKtpxEI0yvu1Hx79YE3QOqN49A DP7TOv951JX12ejKBt0VfvT0AJG7evbKLa42u58YjW9LkRSUY+mfZFNZVOWWI5d4ftZU o0xUwU5/mmrNuHEqSernVECzO6q2gHbIjS061JBg37pASIX8Cd7FHYXJBs752w7f6J2T IZc+ptXG6o/48xXgu9opYhBHZvxgPIhkxRMgqb+Jm0B+2nSr6biY7VDECJWSJ5RCTyXZ gNzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=UBrzni0G; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176092-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176092-linux.lists.archive=gmail.com@vger.kernel.org" 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-5733c2d5a31si2214319a12.294.2024.05.10.11.26.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 11:26:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176092-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=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=UBrzni0G; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176092-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176092-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id A4A141F236C9 for ; Fri, 10 May 2024 18:26:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD3A32E822; Fri, 10 May 2024 18:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="UBrzni0G" Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 371D225779 for ; Fri, 10 May 2024 18:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715365606; cv=none; b=Ct2Y5J2fe3ufjDy9nhfnHMG91XrWYUiuutJKALlzmrvj4ds35n3mrPmQ0GTSkXQGQZBO/5ebg65GxHt3esFsITl3b96g0fYXlN0fnq9CNURUTrscd5GLYru8gFxqs5iiHlRORVzRHd2EcinvFjSNhYnC6a6dmA6u171CaF+Lxs8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715365606; c=relaxed/simple; bh=MhTpSYlniw09ynrGEPyV5q2Agl9hNAli8lBhN6J7RRg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=O3JKay00SytLzxirliqHIVFoPQOI+gmACt/TyJpKHAxhaL8vzEf9EIiFsiDbassRWr/oWWxojoZ/8+K6yphoq4BP00E+mk3zygFJZh5AdVKY0Y2GiD0GSpdlBuOYOy5+6kBdcajFbaCIGPU5AtgJjrp73TSEIF1gMbZ5DXiiF7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=UBrzni0G; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-350513d2c6aso776915f8f.2 for ; Fri, 10 May 2024 11:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1715365603; x=1715970403; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3QEkrlUEm+5W5lnp6HukD9LF+vny0h09LkKwSRX06UI=; b=UBrzni0G85wytcUfSXcnGCHf0H+AdUN+jfDwzItNR+6xb3qCMAvhPtrpGDQpmG0V+t JIVBThQkIUgl7gO7WXxHxZYLmYjJpxqFY+i65+ll20yIHcFm4YWXln15k0tHfglurPg7 XyT3WUApoz7TZcoQ7X9W3TEC5NZngjCE5d3R4n3isgmP5j/XATbrRGYpSDqSPGDeCbuD fEpCzmu5HVZzW3kDy3SrgEiFrEghLeeaq+j7a3kjXbUe1LzxKC0gG+jcH8ZSGhUIix1D FMSqgCwfh/IT+z70rE9998iThzQCUA2EviI3wfy5FoBPQbYLMF11W7Xns4AR4u0hID0f /w+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715365603; x=1715970403; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3QEkrlUEm+5W5lnp6HukD9LF+vny0h09LkKwSRX06UI=; b=fBzbUjmbFEj6Bx6BxxfFxJAYdpygnVlf2l8gV81xUltY/CulPkQ27QJn8c/niGooIW U/c6aVm8k96UsG/gmzFyUfT++l/qTJlgl0GvoJREc9c89A0ziRofeBk3d+Ec1cCGZ1Nw Xwnt3Xgp1pGvGZwl8RyY5Os/KJ0XM/WNyjhBqI86ZpVliFtOOf3zwnjZrQ3KXPFxZBsc F7htmTU8yOLDaAnnmijJMRICiGlCjlUotZsPAhExt4OxOduEM0w1gLRRQ5JXSXmPHqpy 3ey9BdwH1fDb3Z05aVqEUBAdW9ni9aZ8NeN6FhVfuWaoyUT52c+NTWTrZMe5LslXIFd/ p+HA== X-Forwarded-Encrypted: i=1; AJvYcCVjZEgoZdc4e7CKJFIBw5Uzj6bd0BkTuzcE2E/GOmCmJxuLXx+OjB2xhvVB/UInU6AT0J3xWA4wWQHubqQEU9e+WXGhsvUJj4RWrd2T X-Gm-Message-State: AOJu0YzWPan1t97gQne1fNTLM7E5hf0EF+wbiTfZ8wzKR8zcToDEC/RJ 5GF0AJ1ZnKAm9oBV2PLSa+5cjQtd7hi/QhqkZBzvLvWIqOddNW0nxyLCCF74gi0= X-Received: by 2002:adf:f60d:0:b0:34e:aef7:4ff9 with SMTP id ffacd0b85a97d-3504aa62e64mr2798361f8f.61.1715365603515; Fri, 10 May 2024 11:26:43 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:75a:e000:f6ed:a982:f92e:840c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b8a789asm5184745f8f.51.2024.05.10.11.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 11:26:43 -0700 (PDT) From: Bartosz Golaszewski To: Linus Torvalds Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [GIT PULL] gpio: fixes for v6.9 Date: Fri, 10 May 2024 20:26:40 +0200 Message-Id: <20240510182640.44486-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bartosz Golaszewski Linus, Here are some last-minute fixes for this release from the GPIO subsystem. The first two address a regression in performance reported to me after the conversion to using SRCU in GPIOLIB that was merged during the v6.9 merge window. The second patch is not technically a fix but since after the first one we no longer need to use a per-descriptor SRCU struct, I think it's worth to simplify the code before it gets released on Sunday. The next two commits fix two memory issues: one use-after-free bug and one instance of possibly leaking kernel stack memory to user-space. Please pull, Bartosz The following changes since commit e67572cd2204894179d89bd7b984072f19313b03: Linux 6.9-rc6 (2024-04-28 13:47:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-fixes-for-v6.9 for you to fetch changes up to ee0166b637a5e376118e9659e5b4148080f1d27e: gpiolib: cdev: fix uninitialised kfifo (2024-05-10 16:38:27 +0200) ---------------------------------------------------------------- gpio fixes for v6.9 - fix a performance regression in GPIO requesting and releasing after the conversion to SRCU - fix a use-after-free bug due to a race-condition - fix leaking stack memory to user-space in a GPIO uABI corner case ---------------------------------------------------------------- Bartosz Golaszewski (2): gpiolib: fix the speed of descriptor label setting with SRCU gpiolib: use a single SRCU struct for all GPIO descriptors Kent Gibson (1): gpiolib: cdev: fix uninitialised kfifo Zhongqiu Han (1): gpiolib: cdev: Fix use after free in lineinfo_changed_notify drivers/gpio/gpiolib-cdev.c | 18 ++++++++++++-- drivers/gpio/gpiolib.c | 58 ++++++++++++++++++++++++++++----------------- drivers/gpio/gpiolib.h | 17 ++++++++----- 3 files changed, 63 insertions(+), 30 deletions(-)