[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFLxGvzS+o0Q2w1at8aJkhJ6BAcemL_LO9rrOT0O-TKewB0gYw@mail.gmail.com>
Date: Mon, 1 Jun 2020 16:09:42 +0200
From: Richard Weinberger <richard.weinberger@...il.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Zhihao Cheng <chengzhihao1@...wei.com>,
linux-mtd@...ts.infradead.org, Richard Weinberger <richard@....at>,
kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Yi Zhang <yi.zhang@...wei.com>
Subject: Re: [1/2] ubifs: Fix potential memory leaks while iterating entries
On Mon, Jun 1, 2020 at 4:00 PM Markus Elfring <Markus.Elfring@....de> wrote:
>
> >> 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/
No. Please stop this kind of bikeshedding.
Zhihao, feel free to ignore all "advice" given by Markus Elfring.
--
Thanks,
//richard
Powered by blists - more mailing lists