David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, January 20, 2015 10:52 AM [...] > agg->list is not local, you have to use a spinlock to protect > modifications to it, some other sites which modify agg->list do take > the lock properly. > > You cannot modify a list like agg->list without proper locking.
Excuse me. I don't understand. Before step1 tp_rx_done->listA->listB->listC->listD->... rx_queue-> Because the other function would chage tp->rx_done, I need move the lists with spin lock. After step1 tp_rx_done-> rx_queue->listA->listB->listC->listD->... Now I dequeue one of the lists from the list_head and deal with it. tp_rx_done-> rx_queue->listA->listC->listD->... listB Then, if I want to put it back to rx_queue, I have to use spin lock. Why? No other function would chage rx_queue and the items in it. Best Regards, Hayes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/