From: Markus Elfring <Markus.Elfring@web.de>
To: Zhihao Cheng <chengzhihao1@huawei.com>, linux-mtd@lists.infradead.org
Cc: Richard Weinberger <richard@nod.at>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Yi Zhang <yi.zhang@huawei.com>
Subject: Re: [1/2] ubifs: Fix potential memory leaks while iterating entries
Date: Mon, 1 Jun 2020 16:00:33 +0200 [thread overview]
Message-ID: <4fe27809-552e-ea98-ba1f-cbf68e625d22@web.de> (raw)
In-Reply-To: <45e2cd69-93ec-a0b9-b2a6-d170eee44055@huawei.com>
>> I suggest to avoid the specification of duplicate function calls
>> (also for the desired exception handling).
>> Will it be helpful to add a few jump targets?
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162#n455
> I've thought about using "goto err_tag_2" in kill_xattrs code block to release prev xent,
I propose to choose better labels.
> but later it needs to jump to 'out_release tag‘ for releasing previously requested memory,
> which can clutter the code.
Would you like to reconsider this view?
> It seems that two consecutive 'goto tags' will make the code less readable.
How do you think about to try another software adjustment out in such a design direction?
Can it make sense to combine changes together with the update step
“ubifs: dent: Fix some potential memory leaks while iterating entries”
into a single patch?
https://lore.kernel.org/linux-mtd/20200601091037.3794172-2-chengzhihao1@huawei.com/
https://lore.kernel.org/patchwork/patch/1250456/
Regards,
Markus
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-06-01 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2bec05b7-78d3-fa36-134a-efbe977933e3@web.de>
2020-06-01 13:45 ` [PATCH 1/2] ubifs: Fix potential memory leaks while iterating entries Zhihao Cheng
2020-06-01 13:55 ` Richard Weinberger
2020-06-01 14:00 ` Markus Elfring [this message]
2020-06-01 14:09 ` [1/2] " Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4fe27809-552e-ea98-ba1f-cbf68e625d22@web.de \
--to=markus.elfring@web.de \
--cc=chengzhihao1@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox