[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101110.103234.183039029.davem@davemloft.net>
Date: Wed, 10 Nov 2010 10:32:34 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: penguin-kernel@...ove.SAKURA.ne.jp
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] Prevent reading uninitialized memory with socketfilters
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Date: Wed, 10 Nov 2010 23:25:08 +0900
> Just I thought...
>
>> unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
>> {
>> struct sock_filter *fentry; /* We walk down these */
> Can't this be "const struct sock_filter *"?
>> (...snipped...)
>> for (pc = 0; pc < flen; pc++) {
>> fentry = &filter[pc];
> Can't we do
> u32 f_k = fentry->k;
> and replace 27 repetition of fentry->k with f_k?
Yes, this feedback seems reasonable, I'll make these changes when I
apply Eric's patch, thanks!
--
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