treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / net / netfilter / x_tables.c
index 55cb4d1971841706305d19987c7780ba2a50b685..d0d8397c95889f5b947def5ba90b62ac6b1bcaa7 100644 (file)
@@ -1420,7 +1420,7 @@ xt_replace_table(struct xt_table *table,
 
 #ifdef CONFIG_AUDIT
        if (audit_enabled) {
-               audit_log(current->audit_context, GFP_KERNEL,
+               audit_log(audit_context(), GFP_KERNEL,
                          AUDIT_NETFILTER_CFG,
                          "table=%s family=%u entries=%u",
                          table->name, table->af, private->number);
@@ -1904,7 +1904,7 @@ static int __init xt_init(void)
                seqcount_init(&per_cpu(xt_recseq, i));
        }
 
-       xt = kmalloc(sizeof(struct xt_af) * NFPROTO_NUMPROTO, GFP_KERNEL);
+       xt = kmalloc_array(NFPROTO_NUMPROTO, sizeof(struct xt_af), GFP_KERNEL);
        if (!xt)
                return -ENOMEM;