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: <f9f50184-364c-4082-bf19-ea953c3c1429@linux.dev>
Date: Fri, 23 Aug 2024 14:07:20 +0800
From: Youling Tang <youling.tang@...ux.dev>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: linux-bcachefs@...r.kernel.org, linux-kernel@...r.kernel.org,
 Youling Tang <tangyouling@...inos.cn>
Subject: Re: [PATCH] bcachefs: Remove the handling of bch2_trans_iter_exit()
 in __bch2_bkey_get_iter()

On 23/08/2024 11:55, Kent Overstreet wrote:
> On Fri, Aug 23, 2024 at 11:19:55AM GMT, Youling Tang wrote:
>> From: Youling Tang <tangyouling@...inos.cn>
>>
>> - Reduces bkey_err() calls.
>> - Avoid redundant calls to bch2_trans_iter_exit() in some functions.
> no, a function that returns an error should clean up after itself
Yes, functions should self-clean when they fail.

However, there are repeated calls to bch2_trans_iter_exit in
some functions, take lookup_inode() as an example,

When bkey_err(k) returns a non-zero, call bch2_trans_iter_exit()
once in bch2_bkey_get_iter(). It is then called again in
lookup_inode() via 'goto err'. (We can correct it by simply changing
it to 'return ret', but there are many similar cases.)

Thanks,
Youling.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ