mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Anson Huang <anson.huang@nxp.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH V2 2/2] clocksource: imx-gpt: add necessary kfree to avoid resource leak
Date: Sun, 18 Nov 2018 02:52:36 +0100	[thread overview]
Message-ID: <27bef861-5e1e-78af-4eaa-daa6530b7277@linaro.org> (raw)
In-Reply-To: <DB3PR0402MB3916F404D1225F1A00808197F5CB0@DB3PR0402MB3916.eurprd04.prod.outlook.com>


Hi Anson,

On 06/11/2018 10:12, Anson Huang wrote:

[ ... ]

>>>> Please convert to timer-of API.
>>>
>>> This patch mainly to fix the potential resource leak issue, for
>>> converting to timer-of API, should I add another patch for it? Since
>>> it is a different subject.
>>
>> Actually I was unclear. The patch is duplicating the kfree in the error path,
>> usually a rollback routine should be provided.
>>
>> So instead of creating this rollback path, you can directly use the timer-of
>> which contains the error check and rollback.
> 
> I understand the timer-of can save some code in timer driver, but current GPT
> driver is kind of complicated in order to support so many i.MX platforms with
> different GPT design, change it to timer-of will need some effort and I think we
> can do it later. If the duplicating kfree in error path confuses you, I can change
> it to rollback path you said. Below are 2 options in my mind:
> 
> 1. add kfree to rollback path;
> 2. skip this patch, just apply 1/2 patch, and let me find some time to change GPT
> driver using timer-of. 
> 
> Which one do you prefer? Thanks.

I'm fine with option 2.

Thanks

  -- Daniel

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2018-11-18  2:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  1:10 [PATCH V2 1/2] clocksource: imx-gpt: add support for ARM64 Anson Huang
2018-11-05  1:10 ` [PATCH V2 2/2] clocksource: imx-gpt: add necessary kfree to avoid resource leak Anson Huang
2018-11-05 13:34   ` Daniel Lezcano
2018-11-06  1:38     ` Anson Huang
2018-11-06  9:06       ` Daniel Lezcano
2018-11-06  9:12         ` Anson Huang
2018-11-18  1:52           ` Daniel Lezcano [this message]
2018-11-18  1:54 ` [PATCH V2 1/2] clocksource: imx-gpt: add support for ARM64 Daniel Lezcano

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=27bef861-5e1e-78af-4eaa-daa6530b7277@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=anson.huang@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®