lkml.org 
[lkml]   [2020]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] atm: Fix atm_dev reference count leaks in atmtcp_remove_persistent()
From
Date

> The refcount leaks issues occur in two error handling paths.

Can it be nicer to use the term “reference count” for the commit message?


> Fix the issue by …

I suggest to replace this wording by the tag “Fixes”.



> +++ b/drivers/atm/atmtcp.c
> @@ -433,9 +433,15 @@ static int atmtcp_remove_persistent(int itf)
> return -EMEDIUMTYPE;
> }
> dev_data = PRIV(dev);
> - if (!dev_data->persist) return 0;
> + if (!dev_data->persist) {
> + atm_dev_put(dev);
> + return 0;
> + }


I propose to add a jump target for the desired exception handling
in this function implementation.

+ if (!dev_data->persist)
+ goto put_device;


Regards,
Markus

\
 
 \ /
  Last update: 2020-07-29 19:18    [W:0.262 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site