From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (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 D0564430BB6 for ; Sun, 1 Mar 2026 22:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772405658; cv=none; b=RkXF6vRZzwvSNRxrPWKfWIQETAzvlfdMq/BQOK7NgaX4Svu+n9FXd3yBZH3cKkmBBJ8qBD3EAh0dftaZ43YwgV9csbzZIJzGNmRnGdHkB7cnxUX+oRjdAN6A3CYiYkS8deBzWsvcO9d71qtZK2vfdhQGl5hbV4z7FAWpF3NJ7rc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772405658; c=relaxed/simple; bh=hWimFkAbCnQKkjmXUNnbIpdWRffJFEUYePCetchgjnU=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=nLwgKQT9lRXlRRx3RfdYlH4Mm/NyRGn1QOCmHKLbjr1tX5PizFprRME+QYJuHH84vvAPyCsDdlafPJ21MEqQucKg3Vsk9DAJyTeuPWkd1EF1dS8IjkJ52/H+PJzwyhQA2wHlUDvl08XPkOlnByDWGMdo88BC4tym44tqsL4Rnlw= 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=SJrWgywI; arc=none smtp.client-ip=209.85.128.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SJrWgywI" Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-79853c0f5b9so31279107b3.0 for ; Sun, 01 Mar 2026 14:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772405655; x=1773010455; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QA06iBtT4+hVWpWB+rxl5up+EwiLqT9T3dSRZKIAX60=; b=SJrWgywIYe5nUiEq6X9KdiwTbQGFozurAla1w6lLr7CH9SXC7UsrbZ4hQl3jwS0r1K OYw1gtgHEFqhbcHjiv8GLZ7ByeEi8zsxKBUAUtNbggn/W9jglO2bLDDs/3BNrJQ6Zv7s hTxT6SSyEEjB4t/m1xQrQF76Sn/5dIbaibXus369gR1Rjky4YvPQKyz84FOS6FMvLJce 09rgcC5RLqDEBMWiZzITVgcNXK+BzGK+2Ji8T7hTRIkExnP+sJ6/jv7VQEgSCI1DoEsI SyP/ucdnXNZLwqaBTQaF6aAxhPQ9DN1N9AcVlBlcF+ny6yju6QypQ5L0U/ImteTtqV3L vFew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772405655; x=1773010455; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QA06iBtT4+hVWpWB+rxl5up+EwiLqT9T3dSRZKIAX60=; b=IkPeOABKabDoUAOoPvLb843VmWpT+f5RVYRsWUHMjCccCvKKRb9RORcHd8uLA3HtyU hZWX5JPk6ZJeK13UvbslKoE6ccZQW4yDumlxFhnfLNdKnoJXaZW0DyZRtrDt46V2fdFG uJOwFxaVfPtkvMj/NShkoyKt0hUJHGBHHSst1QmsHzbQbAq3YDmrkC/bSk6v1j6bicKV XtRxlnH3IbaOfvNXvOYwZXJrioT7KQTtbleuUVlJm55yT/wvoiwIwQBOa1Ev8+BmSUU9 fcyY8tMg8OlmrJoYAimTqI1iK2wWK6fH+UM4MjgA0RgG9frxkj10Ms0UJvxUh9DxNod1 r4NQ== X-Forwarded-Encrypted: i=1; AJvYcCVg/ESNd9srJef51BWo5u7wq4fsLONreCpJl+3ySbD/sDqnVaoi7VyVKCoBixcWQSFdS2Fze96DIj4x2+k=@vger.kernel.org X-Gm-Message-State: AOJu0YyKoc6sEl5twWP13MAEtZEV8Zh34WKaRwLENouuOwiBOuxjphb/ wjQ6kwmpn3hVE/hlOxiuJMwXuDTWAxdPJKECLwND7KobYFdIZfCUf7WSc0YFagRFZG8= X-Gm-Gg: ATEYQzxDlM7WkwfegFQ6tQ/2bBgRoo68o8r218VFe17QAeLVL3fFNbgY9RLZPjgtqsd A+pLumBUU9Np3Rwx13yRs2nS3hLKUDn96+QFfNtRIWWEx8I/N1ss9dbqk966lHR65KzUKUbYhXu gBEF8RM6dSLe0kfHmWCVeNH8wwZH+vbJRvj4LXU9If4vehxmmpsZA78QABe4jMZJF0k5SGYkWux AIjsXIFVfavJc9AX9Ovu9bZmPMbuSJnCvV6ZjhuYmbLI6tIAVU+O1WsJxCTwga/vAleJPkTjrrq iXb40ykyXSmBnonWLo/lUHSrWx+5ha8Xpkgwe73HeR/w86Rq7Q80jNMEVVkChUk/EabVgZpQSvv p4uUyJbeZVQ/vTMPJFwIKh0InKeoQB0wKHLBAKDJi4L5rG2WvMyHD1uEMbgQttdnphunrUZnVZG xH7Vu0W55owVFyP8GRdOq/KicNDfDo+s0LN6Dl7wT9FYMKv/Nx4fakem+o2VN2Ch6paGw1lTTiO dg9M2myZu0SFOG1pmICUwcbPIxQkRKX X-Received: by 2002:a05:690c:4:b0:798:1637:ff0e with SMTP id 00721157ae682-7988551515dmr96160267b3.22.1772405654784; Sun, 01 Mar 2026 14:54:14 -0800 (PST) Received: from localhost ([2601:7c0:c37c:4c00::5c0b]) by smtp.gmail.com with ESMTPSA id 00721157ae682-79876ca7354sm43742537b3.52.2026.03.01.14.54.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Mar 2026 14:54:14 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sun, 01 Mar 2026 16:53:50 -0600 Message-Id: Cc: "David S . Miller" , "Keerthy" , "Tero Kristo" , , Subject: Re: [PATCH] crypto: sa2ul: add missing IS_ERR checks From: "Ethan Tidmore" To: "Herbert Xu" , "Ethan Tidmore" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260216231609.38021-1-ethantidmore06@gmail.com> In-Reply-To: On Fri Feb 27, 2026 at 9:40 PM CST, Herbert Xu wrote: > On Mon, Feb 16, 2026 at 05:16:09PM -0600, Ethan Tidmore wrote: >> The function dmaengine_desc_get_metadata_ptr() can return an error >> pointer and is not checked for it. Add error pointer checks. >>=20 >> Fixes: 7694b6ca649fe ("crypto: sa2ul - Add crypto driver") >> Signed-off-by: Ethan Tidmore >> --- >> drivers/crypto/sa2ul.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >>=20 >> diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c >> index fdc0b2486069..58d41c269d62 100644 >> --- a/drivers/crypto/sa2ul.c >> +++ b/drivers/crypto/sa2ul.c >> @@ -1051,6 +1051,9 @@ static void sa_aes_dma_in_callback(void *data) >> if (req->iv) { >> mdptr =3D (__be32 *)dmaengine_desc_get_metadata_ptr(rxd->tx_in, &pl, >> &ml); >> + if (IS_ERR(mdptr)) >> + return; > > Thanks for adding the error checks. However, if we get an error > here shouldn't we still free the resources and pass the error up > to the caller? > > Thanks, Since this is a callback I'm not sure how to propagate the error. Nor am I aware of the specific teardown required for this driver. I'll just drop this patch for now, hopefully I was able to draw your attention to this possible issue Thanks, ET