skb_shinfo(skb)->nr_frags counts the number of entries contained
in the skb_shinfo(skb)->frags[] array.
This has nothing to do with the frag list pointer,
skb_shinfo(skb)->frag_list, which is what skb_has_frags()
tests.
You've got some kind of memory corruption going on and it
appears to have nothing to do with the code paths you're
playing with here.
--