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: <10630d7d-9cea-40e1-8140-eb79c06f5c0f@web.de>
Date: Wed, 25 Sep 2024 11:40:09 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>,
 linux-usb@...r.kernel.org, Andreas Noever <andreas.noever@...il.com>,
 Michael Jamet <michael.jamet@...el.com>,
 Yehezkel Bernat <YehezkelShB@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: Re: thunderbolt: Use common error handling code in
 update_property_block()

> It is fine to use goto as it is described in the document you linked but
> this what you are doing is certainly not fine, at least in the code I'm
> maintaining:
>
> out_unlock:
>  	mutex_unlock(&xd->lock);
>   	mutex_unlock(&xdomain_lock);
> 	return;
>
> out_free_dir:
> 	tb_property_free_dir(dir);
> 	goto out_unlock;
>
> This "goto out_unlock" adds another goto to upwards which makes it
> really hard to follow because the flow is not anymore just downwards.

Would you like to benefit any more from the application of
scope-based resource management?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ