]> git.baikalelectronics.ru Git - kernel.git/commit
mac802154: Fix memory corruption with global deferred transmit state.
authorLennert Buytenhek <buytenh@wantstofly.org>
Tue, 21 Jul 2015 14:44:47 +0000 (17:44 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 30 Jul 2015 12:08:55 +0000 (14:08 +0200)
commit085fa1cdc5d3b52280b283aaf2a712e308e10ea6
tree172c0937f69b785793e1f2e63776341833c5800b
parent151b7036abde08d875455dd70406c47ebcb319e9
mac802154: Fix memory corruption with global deferred transmit state.

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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/mac802154/ieee802154_i.h
net/mac802154/main.c
net/mac802154/tx.c