]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/unix/af_unix.c
[NET]: Use BUILD_BUG_ON() for checking size of skb->cb.
[mirror_ubuntu-bionic-kernel.git] / net / unix / af_unix.c
index de6ec519272e5225f85bce0b909a5241a6371a6f..7c91c2024d4947457e98eb8473b168ce248c6f1d 100644 (file)
@@ -2060,10 +2060,7 @@ static int __init af_unix_init(void)
        int rc = -1;
        struct sk_buff *dummy_skb;
 
-       if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)) {
-               printk(KERN_CRIT "%s: panic\n", __FUNCTION__);
-               goto out;
-       }
+       BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb));
 
        rc = proto_register(&unix_proto, 1);
         if (rc != 0) {