From: Florian Westphal Date: Tue, 3 Mar 2015 12:53:31 +0000 (+0100) Subject: net: bridge: add compile-time assert for cb struct size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71e168b151babf4334e2e26c92230a6bda3b1f24;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: bridge: add compile-time assert for cb struct size make build fail if structure no longer fits into ->cb storage. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller --- diff --git a/net/bridge/br.c b/net/bridge/br.c index fb57ab6b24f9..02c24cf63c34 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c @@ -190,6 +190,8 @@ static int __init br_init(void) { int err; + BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb)); + err = stp_proto_register(&br_stp_proto); if (err < 0) { pr_err("bridge: can't register sap for STP\n");