Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2477073rwb; Thu, 29 Sep 2022 10:39:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4GWa9mkjy+NILI+akleDb6/+gu2M9mM8s+abHBLMS9dFZumcs+ebIYW1wqusg6piafwACy X-Received: by 2002:a63:66c6:0:b0:440:5ed1:b400 with SMTP id a189-20020a6366c6000000b004405ed1b400mr1782850pgc.605.1664473142118; Thu, 29 Sep 2022 10:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664473142; cv=none; d=google.com; s=arc-20160816; b=rf5ImmPZbUpjj7nnOUTzFUlBuuwVEOMxlAJ//5yME87+s36FnjHx3LOc8ARF/y3v1o uymAyQ2jN/baB8hqsQ4kjS8JwqPMGLca1HW9M1Vi+DOOEbZkDx/eu/W+TDLaxRZiimhp 3U8zS6dEbMwzaqUYVElKhtOJZpOYoqbtqaxgYSihaoSbga9U+Pg2qnj0wLHT03taYEfH 9Fgu4zk2yxcsT5KDCFAvq+IApXp3mQaP7RqrX/eEcxcXwhx5ysRa0hnjpniLICh4/oPk 3gTJVsHNw0POnWuj1qf+ewTADoZh5fw84e4eQcvsWMqPz76zDgeJaMSCvluwFXe/dcNg iW5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a7nRumC/Yqxa3St983Gp99eBYZhbCfJAmeHWyNFQx4o=; b=ypTIKoAlXXVyq5uMsA82UR6kemahyNgTylCJlLX4/Q0cQ3/e38MF/y16CESfzubIWk vBaxQWxVPD7a293402GGlX3mm9loLiRVqEDK/twhmtamb8ijznV6oVRn6Fnl9dpXtTRs +Dt60UUk45uQHFAzXZT+YpNNchBnuF0XpyqwvoW9aYtqo8Vo+OAzcoEV/TRQjz+2HwJo 8HWz3fDNocCYTCyNjVz0URfwUVdLG27Eo/39QpUruWmmsgJ22w6LYfl//xhAq7aSYQg2 05dyGF16nP7XlYUCMFDkeWPW340iDZDNSmXR41GmSVsvEyx8UY3IUgweMSifFOETjnn7 a+gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d6anIAoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a63114d000000b00434d19f437csi266941pgr.558.2022.09.29.10.38.47; Thu, 29 Sep 2022 10:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d6anIAoC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235713AbiI2QhX (ORCPT + 99 others); Thu, 29 Sep 2022 12:37:23 -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> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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