From: Markus Elfring <Markus.Elfring@web.de>
To: Xin Xiong <xiongx18@fudan.edu.cn>,
Xiyu Yang <xiyuyang19@fudan.edu.cn>,
Xin Tan <tanxin.ctf@gmail.com>,
linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Chas Williams <3chas3@gmail.com>,
Yuan Zhang <yuanxzhang@fudan.edu.cn>
Subject: Re: [PATCH] atm: Fix atm_dev reference count leaks in atmtcp_remove_persistent()
Date: Wed, 29 Jul 2020 19:16:58 +0200 [thread overview]
Message-ID: <444f9cec-db06-c3b1-eadc-14b11260a4ec@web.de> (raw)
…
> 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
reply other threads:[~2020-07-29 17:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=444f9cec-db06-c3b1-eadc-14b11260a4ec@web.de \
--to=markus.elfring@web.de \
--cc=3chas3@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tanxin.ctf@gmail.com \
--cc=xiongx18@fudan.edu.cn \
--cc=xiyuyang19@fudan.edu.cn \
--cc=yuanxzhang@fudan.edu.cn \
/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®