All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
@ 2020-05-15 15:08 ` Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2020-05-15 15:08 UTC (permalink / raw)
  To: Wu Bo, cgroups, linux-block
  Cc: linux-kernel, kernel-janitors, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

…
> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
…

I suggest to omit the source code quotation from the change description.


> if calling blkg_lookup_check() failed, at the IS_ERR block,
> the new_blkg should be free before goto lable fail_unlock
> in blkg_conf_prep() function.

How do you think about a wording variant like the following?

  If a call of the function “blkg_lookup_check” failed,
  release the previously allocated block group before jumping
  to the target “fail_unlock” in the implementation of
  the function “blkg_conf_prep”.


Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
@ 2020-05-15 15:08 ` Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2020-05-15 15:08 UTC (permalink / raw)
  To: Wu Bo, cgroups, linux-block
  Cc: linux-kernel, kernel-janitors, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

…
> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
…

I suggest to omit the source code quotation from the change description.


> if calling blkg_lookup_check() failed, at the IS_ERR block,
> the new_blkg should be free before goto lable fail_unlock
> in blkg_conf_prep() function.

How do you think about a wording variant like the following?

  If a call of the function “blkg_lookup_check” failed,
  release the previously allocated block group before jumping
  to the target “fail_unlock” in the implementation of
  the function “blkg_conf_prep”.


Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
@ 2020-05-15 15:08 ` Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2020-05-15 15:08 UTC (permalink / raw)
  To: Wu Bo, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-block-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

…
> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
…

I suggest to omit the source code quotation from the change description.


> if calling blkg_lookup_check() failed, at the IS_ERR block,
> the new_blkg should be free before goto lable fail_unlock
> in blkg_conf_prep() function.

How do you think about a wording variant like the following?

  If a call of the function “blkg_lookup_check” failed,
  release the previously allocated block group before jumping
  to the target “fail_unlock” in the implementation of
  the function “blkg_conf_prep”.


Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
  2020-05-15 15:08 ` Markus Elfring
  (?)
@ 2020-05-18 11:34   ` Wu Bo
  -1 siblings, 0 replies; 6+ messages in thread
From: Wu Bo @ 2020-05-18 11:34 UTC (permalink / raw)
  To: Markus Elfring, cgroups, linux-block
  Cc: linux-kernel, kernel-janitors, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

On 2020/5/15 23:08, Markus Elfring wrote:
> …
>> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
> …
> 
> I suggest to omit the source code quotation from the change description.
> 
> 
>> if calling blkg_lookup_check() failed, at the IS_ERR block,
>> the new_blkg should be free before goto lable fail_unlock
>> in blkg_conf_prep() function.
> 
> How do you think about a wording variant like the following?
> 
>    If a call of the function “blkg_lookup_check” failed,
>    release the previously allocated block group before jumping
>    to the target “fail_unlock” in the implementation of
>    the function “blkg_conf_prep”.
> 

Thanks for your suggestion. omit the source code quotation from the 
description is more friendly. I will modify the description in V2 patch.

Thanks,
Wu Bo

> 
> Would you like to add the tag “Fixes” to the commit message?
> 
> Regards,
> Markus
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
@ 2020-05-18 11:34   ` Wu Bo
  0 siblings, 0 replies; 6+ messages in thread
From: Wu Bo @ 2020-05-18 11:34 UTC (permalink / raw)
  To: Markus Elfring, cgroups, linux-block
  Cc: linux-kernel, kernel-janitors, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

On 2020/5/15 23:08, Markus Elfring wrote:
> …
>> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
> …
> 
> I suggest to omit the source code quotation from the change description.
> 
> 
>> if calling blkg_lookup_check() failed, at the IS_ERR block,
>> the new_blkg should be free before goto lable fail_unlock
>> in blkg_conf_prep() function.
> 
> How do you think about a wording variant like the following?
> 
>    If a call of the function “blkg_lookup_check” failed,
>    release the previously allocated block group before jumping
>    to the target “fail_unlock” in the implementation of
>    the function “blkg_conf_prep”.
> 

Thanks for your suggestion. omit the source code quotation from the 
description is more friendly. I will modify the description in V2 patch.

Thanks,
Wu Bo

> 
> Would you like to add the tag “Fixes” to the commit message?
> 
> Regards,
> Markus
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] blkcg: Fix memory leak in blkg_conf_prep()
@ 2020-05-18 11:34   ` Wu Bo
  0 siblings, 0 replies; 6+ messages in thread
From: Wu Bo @ 2020-05-18 11:34 UTC (permalink / raw)
  To: Markus Elfring, cgroups, linux-block
  Cc: linux-kernel, kernel-janitors, Feilong Lin, Jens Axboe,
	Tejun Heo, Zhiqiang Liu

On 2020/5/15 23:08, Markus Elfring wrote:
> …
>> new_blkg = blkg_alloc(pos, q, GFP_KERNEL);
> …
> 
> I suggest to omit the source code quotation from the change description.
> 
> 
>> if calling blkg_lookup_check() failed, at the IS_ERR block,
>> the new_blkg should be free before goto lable fail_unlock
>> in blkg_conf_prep() function.
> 
> How do you think about a wording variant like the following?
> 
>    If a call of the function “blkg_lookup_check” failed,
>    release the previously allocated block group before jumping
>    to the target “fail_unlock” in the implementation of
>    the function “blkg_conf_prep”.
> 

Thanks for your suggestion. omit the source code quotation from the 
description is more friendly. I will modify the description in V2 patch.

Thanks,
Wu Bo

> 
> Would you like to add the tag “Fixes” to the commit message?
> 
> Regards,
> Markus
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-18 11:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 15:08 [PATCH] blkcg: Fix memory leak in blkg_conf_prep() Markus Elfring
2020-05-15 15:08 ` Markus Elfring
2020-05-15 15:08 ` Markus Elfring
2020-05-18 11:34 ` Wu Bo
2020-05-18 11:34   ` Wu Bo
2020-05-18 11:34   ` Wu Bo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.