tech-kern archive

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

MCLADDREFERENCE() incrementing the wrong ext_refcnt?



Hello.

I'm under the impression that MCLADDREFERENCE() may increment the wrong 
ext_refcnt.

In case it's permitted (I cant't find anything to the contrary) to 
call MCLADDREFERENCE(m1, m2) and then MCLADDREFERENCE(m2, m3), then the 
second call will increment m2's ext_refcnt where it should be incrementing 
m1's one (e.g. the one all of m1, m2 and m3's m_ext_ref are pointing to), no?

So I think
	atomic_inc_uint(&(o)->m_ext.ext_refcnt);			\
should really be
	atomic_inc_uint(&(o)->m_ext_ref->m_ext.ext_refcnt);		\
which, of course, is the same thing if MEXT_ISEMBEDDED(o) is true.

Am I getting something wrong?


Home | Main Index | Thread Index | Old Index