[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140324.183952.668431875118859796.davem@davemloft.net>
Date: Mon, 24 Mar 2014 18:39:52 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: ast@...mgrid.com, netdev@...r.kernel.org,
richard.cochran@...cron.at, jbenc@...hat.com
Subject: Re: [PATCH net-next 4/9] net: ptp: use
sk_unattached_filter_create() for BPF
From: Daniel Borkmann <dborkman@...hat.com>
Date: Fri, 21 Mar 2014 13:20:13 +0100
> @@ -135,5 +137,10 @@ EXPORT_SYMBOL_GPL(skb_defer_rx_timestamp);
>
> void __init skb_timestamping_init(void)
> {
> - BUG_ON(sk_chk_filter(ptp_filter, ARRAY_SIZE(ptp_filter)));
> + struct sock_filter ptp_filter[] = { PTP_FILTER };
Perhaps you want this to be static or static const? Why copy
PTP_FILTER onto the stack at run time?
> + struct sock_fprog ptp_prog = {
> + .len = ARRAY_SIZE(ptp_filter), .filter = ptp_filter,
> + };
> +
> + BUG_ON(sk_unattached_filter_create(&ptp_insns, &ptp_prog));
> }
--
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