Re: [PATCH] negative dev use in /proc/net/rose_neigh

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: pidoux
Date: Tuesday, October 21, 2008 - 7:14 am

David,

I tried the patch you proposed.
I agree that it makes sense, however it does not prevent rose->neighbour->use to become negative as displayed in
/proc/net/rose_neigh use field value.

I already looked at all of the pieces of code that do "rose->neighbour->use--;"
The only place that caused use to underflow (negative) is actually inside rose_kill_by_neigh().
This is why I had put a test and a warning there.

I think that inside of sk_for_each() loop in rose_kill_by_neigh() when rose->neighbour->use-- becomes = 0 then 
rose->neighbour should be NULLed and in that case only.
However it seems that rose->neighbour is not actually NULLed for in that case the comparison would not be true anymore 
and the decrement would not occur.

I will soon report the printk output of rose->neighbour->use-- inside of the loop to illustrate what happens here.

Bernard Pidoux


David Miller wrote:

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] negative dev use in /proc/net/rose_neigh, Bernard Pidoux, (Sun Sep 28, 12:56 pm)
Re: [PATCH] negative dev use in /proc/net/rose_neigh, David Miller, (Tue Sep 30, 7:32 am)
Re: [PATCH] negative dev use in /proc/net/rose_neigh, Bernard Pidoux, (Tue Sep 30, 2:44 pm)
Re: [PATCH] negative dev use in /proc/net/rose_neigh, David Miller, (Mon Oct 13, 12:30 am)
Re: [PATCH] negative dev use in /proc/net/rose_neigh, pidoux, (Tue Oct 21, 7:14 am)