0

synchronize_rcu()用于仅等待正在进行的 RCU 读取端关键部分完成。如果是这样,当在读取块内调用时,它应该被永远阻塞。但是,以下代码在我的 linux 内核上运行良好,为什么?

void port_range_clean( void ) 
{
    struct port_range *p;

redo:
    rcu_read_lock();
    list_for_each_entry_rcu(p, &port_rt->ports, list) {
        list_del_rcu(&p->list);
        synchronize_rcu();
         rcu_read_unlock();           
        kfree(p);
        goto redo;
    }
}
4

0 回答 0