summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/af_bluetooth.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-09-14 22:50:46 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-09-15 07:15:41 +0300
commit7cb9d20fd9f8fb41f29e294734c4f8b5dc81ed93 (patch)
tree83ec41e619f20b9f87c7e30bd174249bd0f1decc /net/bluetooth/af_bluetooth.c
parent047b2ec8d3778a046d6985d4ad410c85211a86a4 (diff)
downloadlinux-7cb9d20fd9f8fb41f29e294734c4f8b5dc81ed93.tar.bz2
Bluetooth: Add BUILD_BUG_ON check for SKB control buffer size
The struct bt_skb_cb size needs to stay within the limits of skb->cb at all times and to ensure that add a BUILD_BUG_ON to check for it at compile time. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r--net/bluetooth/af_bluetooth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 4dca0299ed96..339c74ad4553 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -709,8 +709,11 @@ EXPORT_SYMBOL_GPL(bt_debugfs);
static int __init bt_init(void)
{
+ struct sk_buff *skb;
int err;
+ BUILD_BUG_ON(sizeof(struct bt_skb_cb) > sizeof(skb->cb));
+
BT_INFO("Core ver %s", VERSION);
bt_debugfs = debugfs_create_dir("bluetooth", NULL);