netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Xiaohui Zhang <ruc_zhangxiaohui@163.com>,
	"David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
Date: Mon, 6 Jun 2022 12:46:08 +0200	[thread overview]
Message-ID: <80637186-e3ef-14c1-78e5-bfa6deec595a@linaro.org> (raw)
In-Reply-To: <20220605081455.34610-1-ruc_zhangxiaohui@163.com>

On 05/06/2022 10:14, Xiaohui Zhang wrote:
> From: xiaohuizhang98 <ruc_zhangxiaohui@163.com>
> 
> We detected a suspected bug with our code clone detection tool.
> 
> Similar to the handling of play_deferred in commit 19cfe912c37b
> ("Bluetooth: btusb: Fix memory leak in play_deferred"), we thought
> a patch might be needed here as well.
> 
> Currently usb_submit_urb is called directly to submit deferred tx
> urbs after unanchor them.
> 
> So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb
> and cause memory leak.
> 
> Put those urbs in tx_anchor to avoid the leak, and also fix the error
> handling.
> 
> Signed-off-by: xiaohuizhang98 <ruc_zhangxiaohui@163.com>

This name still does not match your name used in email.

Best regards,
Krzysztof

  reply	other threads:[~2022-06-06 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05  8:14 [PATCH 1/1] nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred Xiaohui Zhang
2022-06-06 10:46 ` Krzysztof Kozlowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-07  8:32 Xiaohui Zhang
2022-06-07 12:44 ` Krzysztof Kozlowski
2022-06-08 18:00 ` patchwork-bot+netdevbpf
2022-06-03 16:31 Xiaohui Zhang
2022-06-04  1:33 ` Jakub Kicinski

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=80637186-e3ef-14c1-78e5-bfa6deec595a@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ruc_zhangxiaohui@163.com \
    /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;
as well as URLs for NNTP newsgroup(s).