The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Dave Jiang <dave.jiang@intel.com>, Vinod Koul <vkoul@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>,
	dmaengine@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: idxd: Fix dereference on uninitialized pointer conf_dev
Date: Mon, 11 Aug 2025 12:25:04 +0100	[thread overview]
Message-ID: <83538ab0-e3be-4aa1-a9cc-5e02e2c59fac@gmail.com> (raw)
In-Reply-To: <aJnC8CLkQLnY-ZPr@stanley.mountain>


[-- Attachment #1.1.1: Type: text/plain, Size: 1079 bytes --]

On 11/08/2025 11:16, Dan Carpenter wrote:
> On Mon, Aug 11, 2025 at 10:58:36AM +0100, Colin Ian King wrote:
>> Currently if the allocation for wq fails on the initial iteration in
>> the setup loop the error exit path to err will call put_device on
>> an uninitialized pointer conf_dev. Fix this by initializing conf_dev
>> to NULL, note that put_device will ignore a NULL device pointer so no
>> null pointer dereference issues occur on this call.
>>
>> Fixes: 3fd2f4bc010c ("dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs")
>>
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
> 
> No.  This isn't the right fix.  I basically wrote out the correct fix
> in my bug report:
> https://lore.kernel.org/all/aDQt3_rZjX-VuHJW@stanley.mountain/
> Shuai Xue sent a fix as well but that patch wasn't right either but I
> didn't review it until now.
> 
> It's easiest if I send the fix and give you Reported-by credit.
> 
> regards,
> dan carpenter
> 

Thanks Dan, always appreciate your input to these issues.

Colin

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 4901 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      parent reply	other threads:[~2025-08-11 11:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  9:58 [PATCH] dmaengine: idxd: Fix dereference on uninitialized pointer conf_dev Colin Ian King
2025-08-11 10:16 ` Dan Carpenter
2025-08-11 10:46   ` Dan Carpenter
2025-08-11 11:25   ` Colin King (gmail) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83538ab0-e3be-4aa1-a9cc-5e02e2c59fac@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghuay@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinicius.gomes@intel.com \
    --cc=vkoul@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox