bpqether: fix rcu usage
[safe/jmp/linux-2.6] / drivers / net / hamradio / bpqether.c
index 656f278..cc0ee93 100644 (file)
@@ -413,12 +413,12 @@ static void *bpq_seq_next(struct seq_file *seq, void *v, loff_t *pos)
        ++*pos;
 
        if (v == SEQ_START_TOKEN)
-               p = bpq_devices.next;
+               p = rcu_dereference(bpq_devices.next);
        else
-               p = ((struct bpqdev *)v)->bpq_list.next;
+               p = rcu_dereference(((struct bpqdev *)v)->bpq_list.next);
 
        return (p == &bpq_devices) ? NULL 
-               : rcu_dereference(list_entry(p, struct bpqdev, bpq_list));
+               : list_entry(p, struct bpqdev, bpq_list);
 }
 
 static void bpq_seq_stop(struct seq_file *seq, void *v)