From: David Miller <davem@davemloft.net>
To: jonas.jensen@gmail.com
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: moxa: fix TX overrun memory leak
Date: Tue, 28 Mar 2017 18:02:16 -0700 (PDT) [thread overview]
Message-ID: <20170328.180216.784439214031823579.davem@davemloft.net> (raw)
In-Reply-To: <1490695958-23222-1-git-send-email-jonas.jensen@gmail.com>
From: Jonas Jensen <jonas.jensen@gmail.com>
Date: Tue, 28 Mar 2017 12:12:38 +0200
> moxart_mac_start_xmit() doesn't care where tx_tail is, tx_head can
> catch and pass tx_tail, which is bad because moxart_tx_finished()
> isn't guaranteed to catch up on freeing resources from tx_tail.
>
> Add a check in moxart_mac_start_xmit() stopping the queue at the
> end of the circular buffer. Also add a check in moxart_tx_finished()
> waking the queue if the buffer has TX_WAKE_THRESHOLD or more
> free descriptors.
>
> While we're at it, move spin_lock_irq() to happen before our
> descriptor pointer is assigned in moxart_mac_start_xmit().
>
> Addresses https://bugzilla.kernel.org/show_bug.cgi?id=99451
>
> Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
Applied, thank you.
prev parent reply other threads:[~2017-03-29 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 10:12 Jonas Jensen
2017-03-29 1:02 ` David Miller [this message]
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=20170328.180216.784439214031823579.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jonas.jensen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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®