lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b8e127d4-0a8b-437f-a856-3f75d4680045@web.de>
Date: Fri, 21 Feb 2025 14:01:40 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Hans Verkuil <hverkuil@...all.nl>, Ricardo Ribalda
 <ribalda@...omium.org>, linux-media@...r.kernel.org, cocci@...ia.fr,
 Joseph Liu <kwliu@...oton.com>, Marvin Lin <kflin@...oton.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Philipp Zabel <p.zabel@...gutronix.de>
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
 openbmc@...ts.ozlabs.org, Marvin Lin <milkfafa@...il.com>
Subject: Re: [PATCH 1/4] media: nuvoton: Fix reference handling of ece_pdev

…
> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ