Re: dn_route.c momentarily exiting RCU read-side critical section

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

 



On Mon, Nov 05, 2007 at 08:12:03AM -0800, Paul E. McKenney wrote:
> > >> 
> > >> > 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;
>
> Thank you for the info!  Stupid question #3: what sequence of events
> would the smp_read_barrier_depends() be defending against?

The reading of rt from the hash bucket and the dereferencing above.
We need to make sure that we see the initialised rt.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux