diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-09-14 16:50:46 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-09-15 00:15:41 -0400 |
commit | 7cb9d20fd9f8fb41f29e294734c4f8b5dc81ed93 (patch) | |
tree | 83ec41e619f20b9f87c7e30bd174249bd0f1decc /net/bluetooth | |
parent | 047b2ec8d3778a046d6985d4ad410c85211a86a4 (diff) |
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')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 3 |
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); | |||
709 | 709 | ||
710 | static int __init bt_init(void) | 710 | static int __init bt_init(void) |
711 | { | 711 | { |
712 | struct sk_buff *skb; | ||
712 | int err; | 713 | int err; |
713 | 714 | ||
715 | BUILD_BUG_ON(sizeof(struct bt_skb_cb) > sizeof(skb->cb)); | ||
716 | |||
714 | BT_INFO("Core ver %s", VERSION); | 717 | BT_INFO("Core ver %s", VERSION); |
715 | 718 | ||
716 | bt_debugfs = debugfs_create_dir("bluetooth", NULL); | 719 | bt_debugfs = debugfs_create_dir("bluetooth", NULL); |