]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Simplify packet copy in hci_send_to_monitor function
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 12 Jan 2015 03:33:31 +0000 (19:33 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 12 Jan 2015 09:26:04 +0000 (11:26 +0200)
commitdacc147c2005f6c1784ac79ba3b33c892844b611
tree8c62ad0336b5dbf3c1dea02e2171699a0a0f2eea
parente50856980f6df97229457950ef41154d83e4714c
Bluetooth: Simplify packet copy in hci_send_to_monitor function

Within the monitor functionality, the global atomic variable called
monitor_promisc ensures that no memory allocation happend when there
is actually no client listening. This means it is safe to just create
a copy of the skb since it is guaranteed that at least one client
exists. No extra checks needed.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_sock.c