From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F51BC433E0 for ; Wed, 3 Mar 2021 15:02:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEB8C64EBA for ; Wed, 3 Mar 2021 15:02:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEB8C64EBA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FhaNizAUi8AOdbfLKoLAabilkv4+KCV9bAF6/NcCAU8=; b=rDWVYn1LF8L3RRsEFfcz9kic8 bLxGhyNEqYq8+RLIDq4yod2r3z+pvytBxmBzHpg4Nh9IhD6vlgNYY7Z5+MSeTLwlN1BBZpLrEdcBc se7L7BgcJUC24B5ibDarDJjIDxOlQcw+dZm0ZePF7KcSA+xNnYYmThyyi4tucolLu4N1IerE4R8jq zNufnL57MDr6vS9FwEX2l6YNEdRqq0bf3j42i9XW310nOxf5ATfClwhVtX2pkb5sfoDYDJYWOo4U4 3wJK36p7tq9j1gwf3c0T2I5ukp8IdeTWZItL9NqiLmiNypzOUr4jw6B2bS1gZAp0D8wBuAGnJWtkR rllfJlFHQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHSxx-005GFV-Da; Wed, 03 Mar 2021 14:59:09 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSBa-0054QB-Mi for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 14:09:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Of4F23NNKce5gfmN88FbH9n4wRKKkZM/CgqdVgfmWao=; b=no80D9XSJ/2bKgEw/NifmDC8Nn JN5a/6DkwOVU3TgOaHXg3LfkjtN2SfuG0MJQQGxJxuD7RzKC/jf5KXwi0P0xSOvFySg9LFwu/3Cma vs+l18srTjGcthpBqS0dTWrcnKJ5qFyDIv4IcowSaFCSVTfbcGCWpC1qOwNZ4YKiHjSAbjqc+6HB3 BEQ673PgpGKE89eSMtpnAXmwJ8IbwQj3Wk7N/vwKEnmDu8M1q0ZmYxsNVO0DL1Pvnk/EfyAlEM+/U nJHa8dQDz/b3jNtOvZTZRpOlUybkCt2ijMOhxx3y27Bfv5wxgGUVtX7Xejvh8LmAQzgk3WdAkh0VU Ix5BaeKw==; Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lH85E-00HSna-JT for linux-arm-kernel@lists.infradead.org; Tue, 02 Mar 2021 16:41:18 +0000 Received: by mail-wr1-x430.google.com with SMTP id j2so7717367wrx.9 for ; Tue, 02 Mar 2021 08:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Of4F23NNKce5gfmN88FbH9n4wRKKkZM/CgqdVgfmWao=; b=NUxAsNQueA2GU08D+B6HbbpuTEK2OI0fpewkFnlD4xoc38FEX+fJyIPxfFnzAFIGCn U97jbRBzrHvEw2ZJs6kfWi9qIZBYPnub76iuhFQKKZKTe3+zgFSqPARErc5Ij+I4Kv/V FWQ94fQ9068WzSM2ytaJPpS6q+DEtPycjsBtL8uQHrNc9aKsOUByYLsW1Qhsk1RVe5AZ Lsd3Ch33LZot4oELWVzXukK4abe1ADD91k0YXStwODpIaKNY2HfRTuZpYCcmrDzkBwKr PmXwQ4UGQBYdRa238AnQ/0yHbiPlMVYYfDPgGfM2jxNq7ct1RXzPbsqm+8tehPuR4zds ZS8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Of4F23NNKce5gfmN88FbH9n4wRKKkZM/CgqdVgfmWao=; b=lUoZwGD2p7JJY0vC67fm86WlH2RtN5+GaiuedKPusKFdc+/mf5UP3smy4Sxq8EcFLo elIjvNhkUCTd6RyGjxDjRQLB0ppd0XpbMG8C0LhrCGd3j6+RzXNVVhmaBNyz1JYlq65f SEX9PDWwnpYSBCRUYgZPBmB5A+DO2B34m8GhOHaSqdezSLPVqi2MWR/By2c6fYclj4ne wzsMAZ0FcwQNroyJhoZ/VX4Q8RhCM1h5Ull19sseIAXRBDRCgOW67ig/DnFXorifOU2K Do3w6fyxgn7uw1906RVaMfvV0KWQC92+yoHkZrtnsToJltM6N7a8YaTXGuBSuRYpqWo0 tmBA== X-Gm-Message-State: AOAM533t2li82ChX+bcEDYi8bu+aZ/Qum2Ys/DWuBxtw0//N3r2oRQvB pKqUUJmf59wz8/7TQMoRXI5Xf9LIBbE= X-Google-Smtp-Source: ABdhPJy6pwerM85qbie+LwP0wYj3W50IxjOI6418idqDaVxytP6LQvv2m6zQbEQ/1AjKIVhSiR2I6A== X-Received: by 2002:adf:a4d0:: with SMTP id h16mr22591930wrb.52.1614703214272; Tue, 02 Mar 2021 08:40:14 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id i8sm17823373wrx.43.2021.03.02.08.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 08:40:13 -0800 (PST) Date: Tue, 2 Mar 2021 17:40:11 +0100 From: Corentin Labbe To: Colin King Cc: Herbert Xu , "David S . Miller" , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: sun8i-ss: Fix memory leak of object d when dma_iv fails to map Message-ID: References: <20210302163446.21047-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302163446.21047-1-colin.king@canonical.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210302_164118_019402_CDA056A1 X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Tue, Mar 02, 2021 at 04:34:46PM +0000, Colin King a =E9crit : > From: Colin Ian King > = > In the case where the dma_iv mapping fails, the return error path leaks > the memory allocated to object d. Fix this by adding a new error return > label and jumping to this to ensure d is free'd before the return. > = > Addresses-Coverity: ("Resource leak") > Fixes: ac2614d721de ("crypto: sun8i-ss - Add support for the PRNG") > Signed-off-by: Colin Ian King > --- Acked-by: Corentin Labbe Thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel