From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DE7A47887A for ; Thu, 8 Jan 2026 14:23:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767882214; cv=none; b=Sji9apAvSf880t481BUD3laAGK7PLK3oQAa0B3nGb3cwP/cRwYyx2DSsC4SW9T+Uzhoh1M5uzcun3vAx4S38Im9FNdw1KHQfJw5niV33Asd4TvC/AiCsXy2HN+ite7+m/XQtXfloWSAWQnDyIPk2fQeWRrgy/LjmmW1oIcK3/N4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767882214; c=relaxed/simple; bh=+ZrfrczNrfjW1fCSCyE/s4eYBeev5Z9TIijLKawfABE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gVHZJqW+PzCAqEtKfrF7xPG/AnAT+1FCrO8TG5jv2X+VBrFZ7VyTmnNhRnle2SMeySWAq4DxxXk2/FINC092P0rd8qVQBqzs/YwFwllAHcKT5utedTMUpWp0dSN+gfXUf5wRPuCZBdekd1n31UBwf8Bp2ZeIPQnhTTecpPXoaYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=HqfR5PxB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EhP0/wbt; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="HqfR5PxB"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EhP0/wbt" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6089wsqV125834 for ; Thu, 8 Jan 2026 14:23:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7eVwRtiJDUxHxmpPaowK4PRzknoSMnqs+mAFYkctgzw=; b=HqfR5PxB+N0BuNjt /zLTxgN+vdc6YD0jOkrhyewIPo/hfZzMNWGPE9wJ5heia0L+ZjDKzZZkBYkjjT+8 ieE0h+KBe/atu9c/hOlQr/06YsbWGzipSvmVUrFQ8qAtFRZSc4+5AcJ+4PS1vCYh ggMGSymqqsY1RwmiW04w7wztxgw7vmWsQkKU4jjWyMAexq1CunytTGFCd4PJjDGM aui5oOHncgjhMxH4Y3ihYu7tEnFbwp0gJGN+UhkSoKDlbyHatKSyJzmtrSyYIZxd IHJj42H/b7Gm8+JmaItmi+27F5g9M04jOzpNZdIAYABNunjhJnNBfq+JQvp+LSKX O6zMbg== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bj3d6a43s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 08 Jan 2026 14:23:31 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8bb6a7fea4dso769524985a.0 for ; Thu, 08 Jan 2026 06:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767882211; x=1768487011; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7eVwRtiJDUxHxmpPaowK4PRzknoSMnqs+mAFYkctgzw=; b=EhP0/wbtQUaNyolUbYs5hxXEmtWe2aN1CXraRPHblSr6+upbYTI12BO9C5UjqCVukq znJGzzgLQhVo6s/FguqF8OITRypvh0uKI3DJB7YanhJEGF/iL6G8WYA2AsDPCp9ravI/ kh9Ub1tP4CCfJ+ndwkgWORdi8HuUMcRsCjZEST8qITAz5HxadRZQbxvf46BOPLKZpeXn yHz3sedOY5ZcHt8qFRw9L8EqFa4wgnDfAIzqjeYBgzML/YjXKoRCoC55tyhUFiyI8RMH /1EfhTJH5qNYjgJzqnQNow/o8TT6y/M8tRPSOeD0WTbFUTE2l3m8uW/H3JYygXGMT2vQ VOkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767882211; x=1768487011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7eVwRtiJDUxHxmpPaowK4PRzknoSMnqs+mAFYkctgzw=; b=i7jCVxTEI4q6jEWBLmZPlVQ7S36z2yRjFe/nMj/h5gU5pQqJGTytEviErG4Ev2mPdz H3U7RtOhg3jdDgWRl7iR7b5VEfCHzYRdGGMotpbd2FNoSdfpOPQMt5H/zxnGWMfS5Me/ Wd2MST+5kk4ATOIv2Cc3QHCf2FBAaBTRcSExOC0bDTl72VJrSg4kKiOwz4OcD4ynx42w qCRlARkU/JjBjwsT84aqcYw/StxBTv84diVbbQH/oubPu1uX3WhelP78IJ0B+m7KQyGJ D0HmdpZdMQvyy05JHq5kDf7vBUCASNNqfPxUaIxp2n02F/ndc2trx6MP2CVnAtIWONpI eXjA== X-Gm-Message-State: AOJu0YwcHQiaE+b//n0mojQaVz5jZWqUXw+v4aeo6mKcWKRX8y6fnwK5 MBiWsaUakInfDxqfmuM/kOCG+V4limM2OtRwx5dSTaIkWns/kUsN42aQEblr39/78gnQtq26Wzo uPtIQZyFAfa9g6XduZ7unFvLjyzEtL9+BZLSjPXbZb++JF3ApzwCYXcoOMtQp3B1BZdo= X-Gm-Gg: AY/fxX4x6JnwqDg/yIhaO4hFH2nP7+KYLs+0UlDi07RRSV1oAp/rrIfd82883wKAbQH xKys4Z4rztIZaKGkowUeSxngbgmfQurvzJo99z0q/GTGBwQU0ZZm3H8q1vL5PdOAJb1YECRsrKV 5UahwLyr7nmKDqH/Mb28mcKHoO539igRdPn+7ZwbFe0YCZQ6eI+meY+6+dRL3Yk3QJ4oNY/Y9EL e9Alrf4yzIaMDUXgknGgdMOAuF9FRROEzC1kNNgIpx/QLDgDbZPkcjRAxvQ8i2tahMvlpHQVzqf rG+5iijFG4/vNHk4erE9e93FSTrT6fAuNoxAriGY0/NNuiMH1lUaOKtzFuHAs2Dd2/4J7GeFacv f1RkmjMdAncmHOe/ESW57sBESPSR29vw2vDJkHA== X-Received: by 2002:a05:620a:2587:b0:8b2:db27:425e with SMTP id af79cd13be357-8c3893dcab2mr768026485a.50.1767882210698; Thu, 08 Jan 2026 06:23:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyi3nWcn43SMjVyXdm1qGDbCmIHQzD77uA9IDLwKb1zgunp1lCtmXUXMeUfTquFgvzqf54Mw== X-Received: by 2002:a05:620a:2587:b0:8b2:db27:425e with SMTP id af79cd13be357-8c3893dcab2mr768022585a.50.1767882210291; Thu, 08 Jan 2026 06:23:30 -0800 (PST) Received: from brgl-qcom.home ([2a01:cb1d:dc:7e00:5171:301c:72f8:fd25]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f4184cbsm165185405e9.6.2026.01.08.06.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 06:23:29 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Bartosz Golaszewski , Marek Szyprowski , Konrad Dybcio , Bartosz Golaszewski Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH] gpiolib: fix lookup table matching Date: Thu, 8 Jan 2026 15:23:28 +0100 Message-ID: <176788220238.35397.4252497861767343282.b4-ty@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260108102314.18816-1-bartosz.golaszewski@oss.qualcomm.com> References: <20260108102314.18816-1-bartosz.golaszewski@oss.qualcomm.com> 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="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: fihGx-864wnUuXnAjICBVpgY-Uz6QpXn X-Authority-Analysis: v=2.4 cv=APfYzRIR c=1 sm=1 tr=0 ts=695fbde3 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=AQvHNiK9wnbVyoP9-IsA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTA4MDEwMyBTYWx0ZWRfXwlpElCCBbcdo JYgs9ZXQ1Is9i1CUxfMRHOt3OQx7W5cvmvKUbIPnKvLvRzIIRIt1Yjfr3PiqqdsR/zlvowEUWJw +lbFAh5FXHhR3imPHGT7ZMka0sOG+V5s5aMf31jCWKCYO/pga2RFTR6WKgHQwNzpDgIBJgFyqbr AkmBfSP+CrTPGoTwgql/sAcbPTjEIFZcdNbEuZY9mYFVUKMuayLVETSoEjJ3X0eXUhD1X+UxSvn Lr+s00iS/xYLEJwKHw046CNUZF8m6fbjnDa1LUX6Sb8nwXewT7W8wSUU8YXBFFdhBjq1KUGZPcP pkpPCD/Ma0T4cm+CH64ds3HVpbPw07NLMhIARInGxjBbfl7hgtwavru1C+S6nKmm1j3uVamNI2L 9qFwmh4Cm7pPks60xNGcKQHY4Lb7a8Iudr7CuZKqGrhhoTfGSn3OFFoWxlkO/qIqtC+cnHhh222 SnmPVJ3nil+hfO6WJug== X-Proofpoint-ORIG-GUID: fihGx-864wnUuXnAjICBVpgY-Uz6QpXn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-08_03,2026-01-07_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=1015 adultscore=0 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601080103 On Thu, 08 Jan 2026 11:23:14 +0100, Bartosz Golaszewski wrote: > If on any iteration in gpiod_find(), gpio_desc_table_match() returns > NULL (which is normal and expected), we never reinitialize desc back to > ERR_PTR(-ENOENT) and if we don't find a match later on, we will return > NULL causing a NULL-pointer dereference in users not expecting it. Don't > initialize desc, but return ERR_PTR(-ENOENT) explicitly at the end of > the function. > > [...] Applied, thanks! [1/1] gpiolib: fix lookup table matching commit: 36f597bba049928004a050c132ab787ba0eba524 Best regards, -- Bartosz Golaszewski