From: Alexander Aring <alex.aring@gmail.com>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: linux-wpan@vger.kernel.org
Subject: Re: [PATCH bluetooth-next] mac802154: Fix memory corruption with global deferred transmit state.
Date: Wed, 22 Jul 2015 18:26:41 +0200 [thread overview]
Message-ID: <20150722162636.GA9538@omega> (raw)
In-Reply-To: <20150721144447.GH20876@wantstofly.org>
Hi Lennert,
On Tue, Jul 21, 2015 at 05:44:47PM +0300, Lennert Buytenhek wrote:
> When transmitting a packet via a mac802154 driver that can sleep in
> its transmit function, mac802154 defers the call to the driver's
> transmit function to a per-device workqueue.
>
> However, mac802154 uses a single global work_struct for this, which
> means that if you have more than one registered mac802154 interface
> in the system, and you transmit on more than one of them at the same
> time, you'll very easily cause memory corruption.
>
> This patch moves the deferred transmit processing state from global
> variables to struct ieee802154_local, and this seems to fix the memory
> corruption issue.
>
> Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: Alexander Aring <alex.aring@gmail.com>
> ---
> There were patches for this issue on the mailing list, but it
> doesn't seem that a fix for this issue has been applied yet -- how
> about this?
>
yes, something went wrong. Nevertheless I like your patch which also
improved by calling INIT_WORK once at hardware alloc, great. :-)
Thanks Lennert.
- Alex
next prev parent reply other threads:[~2015-07-22 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-21 14:44 [PATCH bluetooth-next] mac802154: Fix memory corruption with global deferred transmit state Lennert Buytenhek
2015-07-22 16:26 ` Alexander Aring [this message]
2015-07-30 12:09 ` Marcel Holtmann
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=20150722162636.GA9538@omega \
--to=alex.aring@gmail.com \
--cc=buytenh@wantstofly.org \
--cc=linux-wpan@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 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.