Re: list_for_each_entry_rcu in net/core/dev.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michele 'mydecay' Marchetto wrote:>
On Sat, 2003-10-25 at 16:57, Dan Kegel wrote:
Michele 'mydecay' Marchetto wrote
>>> i have noticed that in list_for_each_entry_rcu the checks
>>> (!ptype->dev || ptype->dev == skb->dev) are made on the current
>>> packet but the function (delived_skb) is called on the previous one.
>>>
>>> i can't understand why this make sense.. anyone can explain me?
>>
I've seen that idiom used elsewhere in the kernel...
look down further after the loop, I'll bet the last
one found is used later.  ... yup.  See
http://lxr.linux.no/source/net/core/dev.c?v=2.6.0-test7#L1534
pt_prev is referenced after the loop.

this isn't true, if you see my patch, it removes every reference to that variable, and after two days of massive usage, still works fine.

Sorry, I thought you were asking about how net/core/dev.c worked *before* your patch. - Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux