> > >This is racy (albeit very unlikely) because dst may be freed by >dst_run_gc after the atomic_dec. > >When we are not the real parent of the dst (e.g., when we're xfrm_dst >and the child is an rtentry), it may already be on the GC list. > >In fact the current code is buggy to, we need to check dst->flags >before the dec as dst may no longer be valid afterwards. > > > > This patch will remove the need for atomic_dec_and_test for this particular case. Now we can break down the atomic_dec_and_test to atomic_dec & atomic_read. Please comment. Regards Pravin.