Thread (95 messages) 95 messages, 4 authors, 2008-10-01

Re: xfrm_state locking regression...

From: Timo Teräs <hidden>
Date: 2008-09-24 06:20:16

Herbert Xu wrote:
On Wed, Sep 24, 2008 at 09:04:30AM +0300, Timo Teräs wrote:
quoted
Or at least add a comment to the dumping function to say that
we have struct xfrm_state, but in matter of fact it can be
also struct xfrm_state_walk pointer with displacement, so we
better check km.state first.
Which is exactly what we do.  The first thing we check in the
loop is km.state.  I really don't see your problem.
Yes. I'm not complaining that the code does not work.

Just saying that the code easily misleads the reader. And in
this kind of non-obvious places we should have some comments.
Or make the code more readable by adding the intermediate struct.

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