Thread (16 messages) 16 messages, 5 authors, 2011-01-27

Re: [PATCH net-next-2.6] net_sched: sch_mqprio: dont leak kernel memory

flat view

From: Joe Perches <joe@perches.com>
Date: 2011-01-26 21:25:00

On Wed, 2011-01-26 at 21:23 +0100, Eric Dumazet wrote:
Le mercredi 26 janvier 2011 à 11:55 -0800, David Miller a écrit :
quoted
From: Joe Perches <joe@perches.com>
quoted
I think the best style to use memset so that any
possible struct padding is guaranteed to be zeroed.
Such padding does not exist, and we won't add such padding since this is
a user visible data structure and thus whose layout is cast in stone.
Anyways, I'm ambivalent to how this is fixed actually.
I am perfectly aware of this ugly memset() style some people prefer, and
5 % of the time they swap 2nd and 3rd param.
Ugly maybe, but correct, definitely.
The same can not be said of the {0}.

This use ends up the same so it doesn't
matter here, it's just a style question.
Two patches instead of one ;)
How uninteresting.  Any API can be misused.
In this particular case, I only used existing codestyle: In the same
file I noticed :
There are memset's in the file as well.
In fact, memset is used in the same function.

cheers, Joe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help