From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 BDE204964F; Wed, 29 Apr 2026 21:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777497054; cv=none; b=iqrLn6Xif8Af9e4pz76ec+Hzg8HDb4fslMVBG2Nn8YMHXoznOgFjoMq6738nvsiXdQt/ghgv0pLO4EJtlM+EjbxoKt3poeGBn6Wh36GBbHAb3D1nV4gH3GWm2UQ1jiReX4raSORZ1TMTTeaUoTlbfpEg52FfFIBMHUWZYYa6cZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777497054; c=relaxed/simple; bh=bjJjP44Vdub/JDSArIcAt79NnL4gMxt4Patnw0OhOlU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=UnbA4KTsL2EuWl6BjtmLzxMMBh1ZqE0V3EJHpRL+H6/Ar7ENhdhdwjpbxWyRLaEh+O4Mo67lKB/HAxGhj38Mo3UXFV1wk6guAOc27o/ZeQUzAkCJ+Ja0FIRV0WNPDsjukPF7hBAFoRT7XQonuRPVzIUt7AXLQxw6umnuQ077R+Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RtvNTKM5; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RtvNTKM5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777497053; x=1809033053; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=bjJjP44Vdub/JDSArIcAt79NnL4gMxt4Patnw0OhOlU=; b=RtvNTKM53EvrC6dJQAFJ874scpjzCmtEMTl+RcTs7V/VG18STQP9mJ0W 3pox49dI3SgC9ZDgBThV5mFhLko5mmKelLVDO49wGX+LbFa0vsxaHjeyk FvR9rbDFRWXteErx6L1eUritw6H6pQjiR038ELUNBQeLMvCty2xIMWwMD /6h5lNXCPckyRqMG5Xsm2F6scdgJaPkLyo9WyTYdrxGNhM1NxK3Am1Ht1 Mi38fOdT4wZqBdhEKOInwzex9WH8v/r9Gn6fy8XcWwW2jMADZwrYxAThO pCbE9DQtZHjoY5xfUHopeQxdc/P4TsAEKzKx3uCqQ5ja2PnNiSh381GWa A==; X-CSE-ConnectionGUID: tRVARrpTT2uo5rHfSAlWYA== X-CSE-MsgGUID: Ga3doYYsRDqPdduR/rwe1Q== X-IronPort-AV: E=McAfee;i="6800,10657,11771"; a="89528340" X-IronPort-AV: E=Sophos;i="6.23,206,1770624000"; d="scan'208";a="89528340" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2026 14:10:53 -0700 X-CSE-ConnectionGUID: ZHUuYr25Qm6x//lEWy8yYA== X-CSE-MsgGUID: MACfbqJDRGau3IjnpXqCVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,206,1770624000"; d="scan'208";a="231745302" Received: from vcostago-desk1.jf.intel.com (HELO vcostago-desk1) ([10.88.27.144]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2026 14:10:53 -0700 From: Vinicius Costa Gomes To: Guangshuo Li Cc: Dave Jiang , Vinod Koul , Fenghua Yu , Shuai Xue , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] dmaengine: idxd: fix double free in idxd_alloc() error path In-Reply-To: References: <20260413113113.2725940-1-lgs201920130244@gmail.com> <87340m3bi5.fsf@intel.com> Date: Wed, 29 Apr 2026 14:10:52 -0700 Message-ID: <87lde5wjz7.fsf@intel.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: quoted-printable Guangshuo Li writes: > Hi Vinicius, > > Thanks for reviewing. > > On Thu, 23 Apr 2026 at 05:56, Vinicius Costa Gomes > wrote: >> >> On the review of 'v1', you agreed to the comments I made, but they are >> neither reflected in the code nor in the series organization. >> > > You're right =E2=80=94 my v2 did not incorporate the broader issues you p= ointed out. > > At the moment I don't have a good fix for the similar patterns in > idxd_clean_wqs(), idxd_clean_engines(), idxd_clean_groups(), and > idxd_free(). Do you have any suggestion on the preferred way to > restructure those cleanup paths? > The idea is that the explicit free's (kfree()/bitmap_free()/ida_free()/etc) should be removed and instead rely on device_put() doing the right thing on the _release() path. Just not sure if we need to check that the workqueue was already created before calling destroy_workqueue(). Cheers, --=20 Vinicius