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: <eb15ab0a-e416-4ae9-98bb-610fdc04492c@web.de>
Date: Mon, 29 Apr 2024 13:31:13 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Bard Liao <yung-chuan.liao@...ux.intel.com>,
 Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
 linux-sound@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Vinod Koul <vkoul@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Bard Liao <bard.liao@...el.com>,
 Vinod Koul <vinod.koul@...aro.org>
Subject: Re: [PATCH] soundwire: fix usages of device_get_named_child_node()

…
> Add fwnode_handle_put() to avoid leaked references.

                          calls?

Would you like to add the tag “Fixes” accordingly?


…
> +++ b/drivers/soundwire/mipi_disco.c
…
> @@ -236,8 +244,10 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
>  						       dpn[i].num_channels,
>  						       sizeof(*dpn[i].channels),
>  						 GFP_KERNEL);
> -			if (!dpn[i].channels)
> +			if (!dpn[i].channels) {
> +				fwnode_handle_put(node);
>  				return -ENOMEM;
> +			}
>
>  			fwnode_property_read_u32_array(node,
>  					"mipi-sdw-channel-number-list",
> @@ -251,8 +261,10 @@ static int sdw_slave_read_dpn(struct sdw_slave *slave,
>  					dpn[i].num_ch_combinations,
>  					sizeof(*dpn[i].ch_combinations),
>  					GFP_KERNEL);
> -			if (!dpn[i].ch_combinations)
> +			if (!dpn[i].ch_combinations) {
> +				fwnode_handle_put(node);
>  				return -ENOMEM;
> +			}
>
>  			fwnode_property_read_u32_array(node,
>  					"mipi-sdw-channel-combination-list",
…

* Would you like to complete the exception handling by using goto chains?

* How do you think about to increase the application of scope-based resource management?


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ