Hi Simon,
I just gave your patch a try on my laptop and could successfully, reproduceably crash my kernel in the following way: Setting up wifi to ad-hoc mode and connecting it to other batman-wifi-nodes, insmodding batman-adv on my laptop and adding this wifi interface to batman -> kernel hangs (see the two attachements for more detailed error messages thrown by the kernel).
I'm not an expert in this, just a guess: Could it be, that purge_orig() is executing the spinlock first and calling free_orig_node() then, which tries to lock the same variable again, resulting into a deadlock?
Cheers, Linus