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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A979C433F5 for ; Thu, 29 Sep 2022 16:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235717AbiI2QhY (ORCPT ); Thu, 29 Sep 2022 12:37:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235662AbiI2QhU (ORCPT ); Thu, 29 Sep 2022 12:37:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0301288AF; Thu, 29 Sep 2022 09:37:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B232EB823E0; Thu, 29 Sep 2022 16:37:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4C50C433D6; Thu, 29 Sep 2022 16:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664469436; bh=vNYtvUwZ3HUq8cwYA19NVMmvgmpcrt5d+/MrssAtMJQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d6anIAoCx3kZr1zafAJ0CY9NGHSvOaCHXAXVV1BAvAhKOfkxWtOeZsXUNnvt1TN6c 6XBWgMSAcST0XVlIv5tiV4OW06GsnIQI7RN5CdOf26nUv5fMqJ6a2U2vWA2GdJiZsp kWjZL+V70yM+cPvrwRh4aH8KTC2Zn+tZbN3+RFdTDum/jDVWGPa5GA67ebnmFEDWq+ otr/qSGFGzBndUSeq23jQU+a96xr14rCuD2U3AHc6tMozT/xsp+Q9xTbmpLlLNVLaw PlXJWBiNedJTD7xgbJ1hhRCrZ6pWLD96SX9PinHLyZhssSJO8ghDu5Pon4s8DhAzTT q/4pvUHiti2bA== Date: Thu, 29 Sep 2022 22:07:12 +0530 From: Vinod Koul To: Rafael Mendonca Cc: Fenghua Yu , Dave Jiang , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: idxd: Fix memory leak in idxd_alloc() Message-ID: References: <20220914230815.700702-1-rafaelmendsr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220914230815.700702-1-rafaelmendsr@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-09-22, 20:08, Rafael Mendonca wrote: > If the IDA id allocation fails, then the allocated memory for the > idxd_device struct doesn't get freed before returning NULL, which leads to > a memleak. Applied, thanks -- ~Vinod