netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dn_route.c momentarily exiting RCU read-side critical section
@ 2007-10-29 21:15 Paul E. McKenney
  2007-10-30  8:10 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2007-10-29 21:15 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: SteveW, davem, dipankar

Hello!

net/decnet/dn_route.c in dn_rt_cache_get_next() is as follows:

static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt)
{
	struct dn_rt_cache_iter_state *s = rcu_dereference(seq->private);

	rt = rt->u.dst.dn_next;
	while(!rt) {
		rcu_read_unlock_bh();
		if (--s->bucket < 0)
			break;

...  But what happens if seq->private is freed up right here?
...  Or what prevents this from happening?

		rcu_read_lock_bh();
		rt = dn_rt_hash_table[s->bucket].chain;
	}
	return rt;
}

Similar code is in rt_cache_get_next().

So, what am I missing here?

						Thanx, Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-05 23:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 21:15 dn_route.c momentarily exiting RCU read-side critical section Paul E. McKenney
2007-10-30  8:10 ` David Miller
2007-10-30 15:12   ` Paul E. McKenney
2007-11-05 11:53     ` Herbert Xu
2007-11-05 16:12       ` Paul E. McKenney
2007-11-05 23:51         ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).