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] [thread-next>] [day] [month] [year] [list]
Message-ID: <78947b58-9621-49b5-b499-1c7232b62ee5@web.de>
Date: Sun, 4 Jan 2026 11:33:11 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Chen Changcheng <chenchangcheng@...inos.cn>, linux-media@...r.kernel.org,
 Hans de Goede <hansg@...nel.org>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: uvcvideo: Use scope-based cleanup helper

> Replace the manual kfree() with __free(kfree) annotation for data
> references. This aligns the code with the latest kernel style.

              Align?


…
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -291,7 +291,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
>  	struct uvc_streaming_control *ctrl, int probe, u8 query)
>  {
>  	u16 size = uvc_video_ctrl_size(stream);
> -	u8 *data;
> +	u8 *data __free(kfree) = NULL;
>  	int ret;
…

How do you think about to reduce the scopes also for these local variables?


> @@ -317,8 +317,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
>  			"supported. Enabling workaround.\n");
>  		memset(ctrl, 0, sizeof(*ctrl));
>  		ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
> -		ret = 0;
> -		goto out;
> +		return 0
>  	} else if (query == UVC_GET_DEF && probe == 1 && ret != size) {
…

Did you accidentally overlook the need for another semicolon here?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ