From: Markus Elfring <Markus.Elfring@web.de>
To: Hans Verkuil <hverkuil@xs4all.nl>,
Ricardo Ribalda <ribalda@chromium.org>,
linux-media@vger.kernel.org, cocci@inria.fr,
Joseph Liu <kwliu@nuvoton.com>, Marvin Lin <kflin@nuvoton.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
openbmc@lists.ozlabs.org, Marvin Lin <milkfafa@gmail.com>
Subject: Re: [PATCH 1/4] media: nuvoton: Fix reference handling of ece_pdev
Date: Fri, 21 Feb 2025 14:01:40 +0100 [thread overview]
Message-ID: <b8e127d4-0a8b-437f-a856-3f75d4680045@web.de> (raw)
In-Reply-To: <df5693d0-7747-4423-809e-ae081c9aae92@xs4all.nl>
…
> > Found by cocci:
> > ./platform/nuvoton/npcm-video.c:1677:3-9: ERROR: missing put_device; call of_find_device_by_node on line 1667, but without a corresponding object release within this function.
…
> This driver uses this construct:
>
> struct device *ece_dev __free(put_device) = &ece_pdev->dev;
>
> to automatically call put_device. So this patch would 'put' the device twice.
>
> Does cocci understand constructs like this? …
Not yet directly (for coccicheck scripts).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/scripts/coccinelle/free/put_device.cocci?h=v6.14-rc3
I am unsure under which circumstances support can be added for the detection
of scope-based resource management also by the means of the semantic patch language.
Regards,
Markus
next prev parent reply other threads:[~2025-02-21 13:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 21:14 [PATCH 0/4] media: nuvoton: Fix some reference handling issues Ricardo Ribalda
2025-01-21 21:14 ` [PATCH 1/4] media: nuvoton: Fix reference handling of ece_pdev Ricardo Ribalda
2025-02-21 9:04 ` Hans Verkuil
2025-02-21 9:18 ` Hans Verkuil
2025-02-23 18:34 ` Ricardo Ribalda
2025-02-24 5:52 ` Greg KH
2025-02-24 6:34 ` Ricardo Ribalda
2025-02-21 13:01 ` Markus Elfring [this message]
2025-01-21 21:14 ` [PATCH 2/4] media: nuvoton: Fix reference handling of ece_node Ricardo Ribalda
2025-01-21 21:14 ` [PATCH 3/4] media: nuvoton: Use cleanup.h macros for device_node Ricardo Ribalda
2025-01-21 21:14 ` [PATCH 4/4] media: nuvoton: Use cleanup.h macros for put_device Ricardo Ribalda
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=b8e127d4-0a8b-437f-a856-3f75d4680045@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=hverkuil@xs4all.nl \
--cc=kflin@nuvoton.com \
--cc=kwliu@nuvoton.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=milkfafa@gmail.com \
--cc=openbmc@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
--cc=ribalda@chromium.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®