From: Alexandru Hossu <hossu.alexandru@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com,
bingbu.cao@intel.com, mchehab@kernel.org,
gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] staging: media: ipu7: fix double-free of pdata in error paths
Date: Mon, 13 Apr 2026 03:02:52 -0700 (PDT) [thread overview]
Message-ID: <69dcbf4c.170a0220.3ae28e.ec02@mx.google.com> (raw)
In-Reply-To: <20260412205057.386856-5-hossu.alexandru@gmail.com>
On Mon, Apr 13, 2026, Dan Carpenter wrote:
> We need a Fixes tag.
>
> The put_device() frees isys_adev as well so this is a use after free.
>
> ret = dev_err_probe(dev, PTR_ERR(isys_adev->mmu), ...
> put_device();
> return ret;
Good catch on the use-after-free in the return value. Will send v2 with:
- Fixes: b7fe4c0019b1 ("media: staging/ipu7: add Intel IPU7 PCI device driver")
- Save error code via ret = dev_err_probe() before put_device() in both
ipu7_isys_init() and ipu7_psys_init(), then return ERR_PTR(ret)
Alexandru
next parent reply other threads:[~2026-04-13 10:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260412205057.386856-5-hossu.alexandru@gmail.com>
2026-04-13 10:02 ` Alexandru Hossu [this message]
2026-04-13 10:15 ` [PATCH v2] staging: media: ipu7: fix double-free and use-after-free in error paths Alexandru Hossu
2026-04-13 10:27 ` Dan Carpenter
2026-04-12 20:51 [PATCH 5/5] staging: media: ipu7: fix double-free of pdata " Alexandru Hossu
2026-04-13 8:27 ` Dan Carpenter
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=69dcbf4c.170a0220.3ae28e.ec02@mx.google.com \
--to=hossu.alexandru@gmail.com \
--cc=bingbu.cao@intel.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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