lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  3 Mar 2015 03:50:22 +0100
From:	Florian Westphal <fw@...len.de>
To:	<netdev@...r.kernel.org>
Cc:	Florian Westphal <fw@...len.de>
Subject: [PATCH] net: bridge: add compile-time assert for cb struct size

make build fail if struct doesn't fit into ->cb storage area.

Signed-off-by: Florian Westphal <fw@...len.de>
---
 net/bridge/br.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/bridge/br.c b/net/bridge/br.c
index fb57ab6..9542c53 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -188,8 +188,11 @@ static const struct stp_proto br_stp_proto = {
 
 static int __init br_init(void)
 {
+	struct sk_buff *skb;
 	int err;
 
+	BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > sizeof(skb->cb));
+
 	err = stp_proto_register(&br_stp_proto);
 	if (err < 0) {
 		pr_err("bridge: can't register sap for STP\n");
-- 
2.0.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ