[Click] 2.6 update - Bug + Fix

Beyers Cronje bcronje at gmail.com
Wed Jun 28 13:38:30 EDT 2006


Hi Eddie,

Because of C precedence rules this gets parsed as
>
> !( (atomic_read(&skb_shinfo(skb)->dataref) - skb->nohdr)
>     ? (1 << SKB_DATAREF_SHIFT) + 1
>     : 1 )
>
> which is always true.  So skbs never get recycled in your code.


Bad bad code from me.

There is no need for a following atomic_sub, since dataref is set to 1 below
> anyway.


2 Bonehead mistakes in a two liner patch, more bad. In my defense the bug
and solution found me at 05:00am right before I went to bed after an
all-nighter and I just had to quickly check if it worked :)

Does this work for you?


Works 100%, thanks!

Beyers


More information about the click mailing list