From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C3F4E4A1C; Sat, 4 May 2024 12:47:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714826838; cv=none; b=g4mxUIAvM05wyQly67BZb8aDH7hxy/rVzs/YtHcB4NvNVftvN7lU9aaenzBXoBw2s9iR5deqgqdKK7VjpiIKANFlkR7lcQvQjvq4xKpZ8QM1TCTAsxiQZlmUszRdWufHGQHhDYAhL0dUMpRO5ikxgZxL3A2fWLxbc4KiFEgVpqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714826838; c=relaxed/simple; bh=pqt4smRG+5GybQjA6EDoHDsoEsSsIw8WFxe/LSzKYEc=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=Rn6LDIOwvScF7WyA9RynEXtDs9zT9piSR+DQfMiu4HGg4u6ndBF5YgLhSjHIShGuj1FcqCP/7fH1AYF4FqYNQpF286+8UcScFPylDdeBmSzpk759JSXjuq/wLn1jBDXwTxbHN4A/PPHvYxS7QJnvJ5PoW5rICjbPcQ/Ry/RAUYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dECQiKYS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dECQiKYS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8E91C072AA; Sat, 4 May 2024 12:47:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714826838; bh=pqt4smRG+5GybQjA6EDoHDsoEsSsIw8WFxe/LSzKYEc=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=dECQiKYSEs8riK5ARRXLe07H4rxQwTdCV5Dt+wU3JnDUUT3ZVVJ0efwyIbc6Ujzf1 YQbaAxU/bBhDIFaXtxVtqr2qyzftsllLkJ6/OnVpjUIDSVp2VRLTptPSyqwj3N3t7M yUoWHzXE8YAGBWTgp9OpREjPB4jVm9WlNgfR7grzLncBYxgQk8eHrB070ijPlpEc/x ZdIzRCZasjjEICeX9Xv0+ozqEQ4K++O/dEMjvxCry1VaA5Si/iufI4CH/aTAKlbSPg CrhsO2TD6ndgpEBqhAZzXjJWKBNDlGkuIAcujM+VnpMvelSnDKlbrxpe+jbR52jxOr okzRfDZsSFHZQ== From: Vinod Koul To: Dave Jiang , Fenghua Yu Cc: dmaengine@vger.kernel.org, linux-kernel , Lijun Pan In-Reply-To: <20240130013954.2024231-1-fenghua.yu@intel.com> References: <20240130013954.2024231-1-fenghua.yu@intel.com> Subject: Re: [PATCH] dmaengine: idxd: Avoid unnecessary destruction of file_ida Message-Id: <171482683528.61200.11644725480487646401.b4-ty@kernel.org> Date: Sat, 04 May 2024 18:17:15 +0530 Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13.0 On Mon, 29 Jan 2024 17:39:54 -0800, Fenghua Yu wrote: > file_ida is allocated during cdev open and is freed accordingly > during cdev release. This sequence is guaranteed by driver file > operations. Therefore, there is no need to destroy an already empty > file_ida when the WQ cdev is removed. > > Worse, ida_free() in cdev release may happen after destruction of > file_ida per WQ cdev. This can lead to accessing an id in file_ida > after it has been destroyed, resulting in a kernel panic. > > [...] Applied, thanks! [1/1] dmaengine: idxd: Avoid unnecessary destruction of file_ida commit: 76e43fa6a456787bad31b8d0daeabda27351a480 Best regards, -- ~Vinod